Creating XML document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2017 12:20 AM
Hello,
I need to create a XML document which should be in UTF-8 encoding. I have in the script large object which I want to convert to XML.
I have found "XMLHelper" class and "toXMLStr()" method which should do that.
What I have figured out is that this method "toXMLStr()" doesn't do any escaping of special characters which causes generating of invalid XML document.
Second thing is that I was not able to find any documentation related to this method regarding to encoding of XML document. Do you know when I use this method what is the encoding format of generated XML document?
Do you have maybe any other suggestion when I want to easily convert object structure to XML what method or class would be the best for escaping the special characters(<,>,...) and to get UTF-8 encoding?
thanks a lot
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2017 10:07 PM