Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Bug in xml parser?
Bug in xml parser? [message #27272] |
Fri, 09 July 2010 22:55 |
aftershock
Messages: 143 Registered: May 2008
|
Experienced Member |
|
|
Hi,
I wonder if there is bug in xml parser because of the following problem.
I use XMLRPC package.
I debuged the package. I can see this.
The server returns an xml which something like this:
<value><string>line1\nline2\nline3\n</string></value>
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?
It looks so.
This is how I fixed it:
Add this line to xmlparser class definition:
void Preserve(bool b) { npreserve = b; }
Modified xmlrpc\client.cpp
This is the result of changes around line 65.
if(IsNull(response)) {
faultCode = XMLRPC_CLIENT_HTTP_ERROR;
faultString = server.GetError();
error = "Http request failed: " + faultString;
LLOG(error);
return ErrorValue(error);
}
XmlParser p(response);
p.Preserve(true); //<-- new line
try {
[Updated on: Sat, 10 July 2010 10:12] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Apr 20 11:54:21 CEST 2024
Total time taken to generate the page: 0.03765 seconds
|