Issue 58: Not able to encode characters using touchXML
Status:  Invalid
Owner: ----
Closed:  May 2009
Reported by rajakond...@gmail.com, May 11, 2009
What steps will reproduce the problem?
1. Init CXMLDocument with some UTF8 string having < and > characters. I
tried to encode characters using NSString using
stringWithData:encoding. 
2. Try to parse the CXMLDocument using XPath.

What is the expected output? What do you see instead?
The nodes should come out in XML format rather than < and > format


What version of the product are you using? On what operating system?
Latest as of April 28th

Please provide any additional information below.
Enclosed the file for your reference. I am getting XML output from soap service which is in < 
and > format. Now i need to convert output string to text/xml format. Any help would be 
greatly appreciated.


HelloSOAPViewController.m
6.5 KB   View   Download
May 12, 2009
#1 jpedroso@gmail.com
My first guess is that it's the caller responsibility to init CXMLDocument with unescaped entities. Somebody 
correct me if I'm wrong here, but libxml2 assumes that—libxml2 does provide a xmlStringDecodeEntities 
function in its parser internals but there's nothing we can do with it before xmlParseDoc. 

As to unescape your entities in output string, CFXMLCreateStringByUnescapingEntities isn't available on the 
iPhone so you are on your own. Note that there's already code outhere. See https://code.google.com/p/wimframework/source/browse/trunk/WimFramework/Classes/Helpers/WimAdditi
ons.m for example.





May 13, 2009
Project Member #2 jwight
The < and > are present in the input data. It is your calling code's responsibility to 
unescape them if needed. This is NOT a bug with TouchXML.
Status: Invalid