Convert String to Well Formed XML String
807589Sep 18 2008 — edited Sep 18 2008Hi folks,
I am facing a problem and I hope there is a simple solution.
I am working with an XML document. I am setting the XML tag names dynamically. I just realized that the input strings contains characters that are not allowed under XML.
Is there a simple way to convert the input String to a "safe" XML string and then re-convert it back?
I need just two functions:
String MySafeXMLString = ConvertToSafe ( myUnsafeXMLString)
String myUnsafeXMLString = ConvertToUnsafe ( MySafeXMLString)
.. IE I just need a function to translate a generic string to an acceptable XML string and then convert it back at a later time.
Please help.
Thanks.
Dwight