Skip to Content

Edit XML Header

Hello Gurus,

We are using PI 7.11. We have a requirement PROXY to FILE in which the receiver expecting the below XML header:

Actual:

<?xml version="1.0" encoding="UTF-8"?>

Required:

<?xml version="1.0" encoding="UTF-8" standalone="true"?>

Please let me know how to achieve this..

Thanks

Ravi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 28, 2017 at 06:35 AM

    Hi Ravi!

    I don't know any details about your current mapping and your message structure.

    Thus, here is an XSL transformation that you can use as very last message mapping in your operation mapping. It just copies current payload and adds the required attribute to XML message header:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output standalone="yes"/>
        <xsl:template match="/">
            <xsl:copy-of select="."/>
        </xsl:template>
    </xsl:stylesheet>

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 27, 2017 at 01:43 PM

    Hi Ravi!

    You can use XSLT transformation to add required attribute to your XML message header:

    <xsl:output standalone="yes"/>

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded