I have an Oracle Procedure that returns xml. There was an exception thrown
when I tried to load an XmlDocument (using LoadXml(String)) because the value
returned from Oracle had an exclamation mark in a text node. So I wrote an
escape method to encode the text coming into the .Net class. But now I am not
sure how to write the unescape method to handle the text when it goes back to
the Oracle db.
Here's what I mean:
- if the data in the db is "abc ! & ' " < > efg", the procedure produces
this element
<data>abc ! & " ' < > xyz</data>
- loading this into an XmlDocument using thedocument.LoadXml(oraclestring)
leaves
<data>abc ! & ' " < > xyz</data>
So do I write a method to change the "&", "<" and ">" back to "&<>" in
Oracle? How many other characters are changed and to what? Why was it bad for
me to give an "!" in the string when .Net then uses it unescaped thereafter?
I await enlightenment peacefully.