Hello guys,
I'm using the action "XmlToRecordList", with the header: <?xml version="1.0" encoding="UTF-8"?>.
I'm getting all the information that I want, including the characters: &, ' and ". The problem come when I insert < and >. If I use ">" alone, there is no problem. But if I try to insert "<", I get an error. The way I found to avoid this kind of problems, is replacing them, for example:
Replace(XML,"&","& + amp;")
but with "<" I can't do it because I have a lot of tags as you understand.
So, I need to protect from errors, when the file has "<".
Anyone can help me?
It sounds like you're running into issues escaping special characters in your xml. There is a good stack overflow article here on how to escape xml characters.
For your use case, you'll want to manipulate the xml prior to using the XmlToRecordList action. Taken from this article, you'll want to:
Add the following Dependencies to your Module:
You would then iterate through each item escaping the content with one of the methods from the stack overflow link.
After escaping all the values, you then should be able to put it all back into your variable to feed it into the XmlToRecordList action.