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
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.........
Solved! Go to Solution.
I was dealing with the same problem for the past week - I worked around it putting the corrupt chunk into another multiline-text variable (using the XML Query of the outer repeating section,) and using the Regular Expression function to replace the corrupted bits with their appropriate characters. Does that make sense?
Hi, Scott Lassiter! Did Jose's solution work or did you find one? If so, please let us know. If you're still seeking a solution, your feedback is always welcome. Thank you!
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.
You're right, corrupt is not the right word.
The XmlDecode function is much quicker and simpler. I was doing the 'decoding' by hand with three replacements (in the Regular Expressions,) but the inline function works perfectly in a Set Variable box.
Thank you for pointing us in the right direction!