cancel
Showing results for 
Search instead for 
Did you mean: 

XML document action block escaping "<" character

Former Member
0 Kudos

I have a transaction where the intended output XML needs to be in the following format

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

<rowsets>

<rowset>

<head />

<Row id="1">

<cell>1</cell>

<cell>476396</cell>

<cell>DSI01.SATO</cell>

<cell>DSI01.SATO</cell>

<cell>DSI01.SATO</cell>

<cell>DSI01.SATO</cell>

<cell xmlcontent="true">DSI01.SATO<option value="DSI01.SATO">DSI01.SATO</option><option value="DSI97.SATO">DSI97.SATO</option></cell>

</Row>

<Row id="2">

<cell>1</cell>

<cell>477026</cell>

<cell>Select</cell>

<cell>Select</cell>

<cell>Select</cell>

<cell>Select</cell>

<cell xmlcontent="true">Select<option value="Select">Select</option><option value="F11WOW.LZR">F11WOW.LZR</option></cell>

</Row>

</rowset>

</rowsets>

The one field contains XML content and the XML Document action block is escaping the "<" and ">" characters into "&lt;" and "&gt;"

I have tried to turn these back to the original characters through an XSLT but have been unsuccessful.

I currently have my transaction building the XML as a string and converting it to XML at the end with the String to XML Parser.  This works fine, but I thought I would ask if anyone has encountered a similar issue and found a cleaner solution.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member193328
Active Participant
0 Kudos

Hi Paul

The &lt etc are added to ensure no malicious content gets added to the xml. In most cases this should not be a problem (except on the browser which is the precise reason they are added). All parsers including MII actions that take in XML as input should be able to read the XML with such escape characters without any issues.

Please let me know where, if any, you face issues with this.

Regards

Partha