tags:

views:

36

answers:

2

Hi,

I wonder if there is bug in a xml parser because of the 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.

+2  A: 

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.

Pointy
A: 

Yes, it seems to be a bug caused by badly used xml parser....

Pointy showed the way.

Aftershock