Skip to Content
0

Edit XML Header

Apr 27, 2017 at 12:09 PM

73

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Apr 28, 2017 at 06:35 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Apr 27, 2017 at 01:43 PM
1

Hi Ravi!

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

<xsl:output standalone="yes"/>

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Kolmakov,

As I am new to XSLT mapping, request you to please provide full code.

Many thanks in advance.

Thanks

Ravi

0