[xml] Fwd: Issue extracting text node content

the mistake was in another place. 

Many thanks for the help I got on your IRC channel.


Début du message réexpédié :

De : Gérald Fenoy <gerald fenoy geolabs fr>
Date : 30 janvier 2011 11:41:05 HNEC
Objet : Issue extracting text node content

Hi list,
I get a really strange issue using libxml2 for extracting some text node content. 

Indeed, when I get a '+' character in a text node and I use one of GetNodeContent, xmlNodeListGetString or xmlNodeListGetRawString function then in the xmlChar returned I lost the '+' characters. I discovered this when trying to decode base64 string embedded in the XML request received by the application.

I use libxml2 version 2.7.7.

So I am wondering where I failed to use libxml2 properly here. Note that the file used in input is a well formed XML file encoded in UTF-8 and also that I'm not sure that only '+' characters was removed, I just detect this one as the base64 string I dealt with got it.

Here is the code snipest which cause trouble : 

xmlChar* tmp=xmlNodeListGetRawString(doc,cur4->xmlChildrenNode,0);

I hope you can help me to solve this issue, if I forget to give you any information please let me know.

Hope to hear from you,
best regards,

Gérald Fenoy

Siège social :
Futur Building I
1280, avenue des Platanes
34970 Lattes
Tél. fixe : +33 (0) 4 67 43 09 95
Tél. portable : +33 (0) 6 70 08 25 39

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]