[Expat-discuss] XML_Parse( ) Stripping the '\r' characters from the XML message

Swapnil Barai (sbarai) sbarai at cisco.com
Mon Aug 15 20:44:41 CEST 2011


HI Folks,

 

I am facing the following problem using EXPAT's XML_Parse() API.

 

I have an XML message shown below,

 

<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<transaction
length=\"462\"  protocolversion=\"1\">\n <CRREQ>\n<originalreq>GET
http://sjst81.cisco.com/preview.wmf HTTP/1.0\r\nUser-Agent: Wget/1.10.2
(Red Hat modified)\r\nAccept: */*\r\nHost:
sjst81.cisco.com\r\n\r\n</originalreq>\n </CRREQ>\n</transaction>\n"

 

Now after we pass this XML message to the XML_Parse API for parsing, the
output we get does not contain any '\r' characters inside any of the XML
tags. However in my case I need these characters to be still present
there after the XML Parsing.

 

Is this a known issue and is there a workaround to overcome this.

 

Any help is appreciated.

 

Thanks

Swapnil



More information about the Expat-discuss mailing list