Hi Andrei,
> for(XMLSize_t i = 0; i < laListe->getLength(); i++)
> {
> noeud_courant = laListe->item(i);
> //on ne peut pas utiliser tempStr car la taille du contenu peur
> ętre superieur ŕ 99
> char * une_fuite_de_memoire_colmate =
> XMLString::transcode(noeud_courant->getNodeName());
> String nom_courant (une_fuite_de_memoire_colmate);
> delete [] une_fuite_de_memoire_colmate;
> String * contenu_courant = XML::getTextContent(noeud_courant);
> //I lost the contents
You are transcoding characters to the local code page, using
XMLString::transcode() (I'm assuming that's what XML::getTextContext()
does). Unfortunately, there is no way to tell if those characters can be
represented in the local code page. I suspect they cannot, so the
transcoder is failing. One problem with local code page transcoding is
it's often difficult to tell if something fails, because the system
functions do not return an error code. Instead, they just stop transcoding
when they reach the first character they cannot represent.
In general, you cannot trust that the machine on which your program
executes can encode any particular Unicode character in a char, so it's
best not to do any transcoding. If you want to verify the values of DOM
text nodes, you should serialize the document and view it in a text viewer
which is capable of displaying that particular encoding.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]