Is this a bug in a xml parser?
I wonder if there is bug in a xml parser because of th开发者_Go百科e following problem.
I use a XMLRPC package which uses an xml parser. I debugged the package. I can see this. The server returns an xml which something like this:
<value><string>line1\nline2\nline3\n</string></value>
\n represesnts literal new line character (10,13 or 10).
The parser returns a string which is "line1\nline2\nline3" without the final \n. My question is .. Is this bug if the xml parser does not return the final \n?
Answer: Yes, it is a bug.
Usually you get back "trimmed" strings from XML APIs. I don't know what parser you're using, but it might be possible to tell it you want an "untrimmed" value.
Yes, it seems to be a bug caused by badly used xml parser....
Pointy showed the way.
精彩评论