Hi,

        are you aware that getNodeValue on an element returns NULL?

Gareth


--
Gareth Reakes, Managing Director            +44-1865-811184
Parthenon Computing                http://www.parthcomp.com




On Mon, 15 Mar 2004, [iso-8859-1] David --- wrote:

>
> Hi,
> I'm having a problem building a Domparser.
> The code below run properly qnd after debugging it
> exits normally as well.
>
> It seems the problem comes from the transcode method.
> If i remove the transcode it returns the corresponding
> encoded value but like that it return nothing and it
> dies after i call the transcode method.
>
>       for( std::vector<std::string>::iterator tag =
> tags.begin(); tag !=tags.end(); tag++)
>       {
>           char *query = strdup((*tag).c_str());
>           XMLCh* tmpstr = XMLString::transcode(query);
>
>           int len;
>           c_nodelist = c_doc->getElementsByTagName(tmpstr);
>           len = c_nodelist->getLength();
>           std::cout << "LEN " << len << std::endl;
>           for (int i = 0 ; i < len ; i++)
>               {
>                   c_node = c_nodelist->item(i);
>                   const XMLCh* val = c_node->getNodeValue();
>                   char *test = XMLString::transcode(val);
>                   std::cout <<"Val: " <<
> XMLString::transcode(val);
>               }
>
>
>
>       }
>
>
>
>
>
>
>
>
>
>
>
> Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
> Cr�ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
>
> Dialoguez en direct avec vos amis gr�ce � Yahoo! Messenger !T�l�chargez Yahoo! 
> Messenger sur http://fr.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to