I don't know how parse a string with some \n
inside.
I have this string:
res = "<?xml version=\"1.0\"
encoding=\"iso-8859-1\"?>";
res += "<Message>"; res += "<ResponsePingATM Type=\"Status\" Order=\"1\" PhoneNumber=\"899999999\" Response=\"1\">"; res += "</ResponsePingATM>"; res += "</Message>"; string without end of lines;
When i do
doc = xmlParseMemory( res.c_str(),
res.length());
cur =
xmlDocGetRootElement(doc);
** cur->name is Message cur =
cur->xmlChildrenNode;
** cur->name is ResponsePingATM The problem is that i receive the following
string
res = "<?xml version=\"1.0\"
encoding=\"iso-8859-1\"?>\n";
res += "<Message>\n"; res += "<ResponsePingATM Type=\"Status\" Order=\"1\" PhoneNumber=\"899999999\" Response=\"1\">\n"; res += "</ResponsePingATM>\n"; res += "</Message>"; string with end of lines;
When i do
doc = xmlParseMemory( res.c_str(),
res.length());
cur =
xmlDocGetRootElement(doc);
** cur->name is Message cur =
cur->xmlChildrenNode;
** cur->name is text Are there other ways to parse this string (cur->next not
allowed) that ignores \n?
Thnak you to all. |