Nested Repeating Sections creating Corrupt XML


Badge +1

I have a form with a repeating panel that has a nested repeating panel inside it where users can enter license numbers. There is specific reasoning for having the nested panels, due to the nature of the requirements. I would like to be able to take the XML output from the containing repeating section, which is saved into a multiline text field (plain text) and pull out various XML tags, using the XML Query Action. The problem is that most of the XML that is exported from the form and placed into a multiline text field is "corrupt". For some reason all of the opening and closing tags "ie <" , quotation marks, and question marks are using the equivalent ascii character, like "quot;". One work around is to pull the XML into a variable and run a replace formula or use the Regular Expression action, however I thought I would see if anyone else has run into this issue and if they know of a workaround to get "clean" XML exported from their forms.

 

Here is an example of the exported XML:

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version

/><Items><Item><PN type="System.String">9</PN><Qty

type="System.String">1</Qty><Version

type="System.String"></Version><LicenseNumbers

type="System.String">&amp;lt;?xml version=&amp;quot;1.0&amp;quot;

encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;RepeaterData&amp;gt;&amp;lt;Version

/&amp;gt;&amp;lt;Items&amp;gt;&amp;lt;Item&amp;

 

Also note that it is dumping in a duplicate beginning opening tag XML tag. I understand that it is doing this because it is a nested repeating section, however I can live with that for now.........


2 replies

Badge +9

XML is not corrupt. Outer XML contains embedded XML as value string, therefor this XML was encoded. You have to decode embedded XML string, e.g. by inline function XmlDecode.

Badge +9

Will you be able to attach the workflow or a screenshot with details?

Reply