You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by CAD BILBAO <ca...@bilbao.com> on 2001/04/10 10:20:15 UTC

transcode()

Hi!

Using Apache XML Xerces for C++, with Visual C++ 6.0 on NT.

I am trying to parse a XML doc. I want to display the
value of a node and execute an action if this value is 
"James T.". I succeed in displaying the value ("James T."),
but not in executing the action:

------//------
DOMString value = newNode.getNodeValue();

char *valueT = value.transcode();			
cout << "VALUE = " << valueT  << "\n"; 
if (valueT=="James T.") {
    cout << "EXECUTING..." << "\n";	
    execute_the_action();
}
------//----

What must I do to compare a 'transcode value' (valueT) with
a string ("James T.")?

Thanx.
___________________________________________________________________________
Tu correo gratuito en HispaVista - http://www.hispavista.com/altacorreo/

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: transcode()

Posted by Juergen Hermann <jh...@web.de>.
On Tue, 10 Apr 2001 10:20:15 +0200, CAD BILBAO wrote:

>What must I do to compare a 'transcode value' (valueT) with
>a string ("James T.")?

The easiest way by far is to use 

	if (value.equals("James T.")) ...

i.e. not to transcode at all.


Ciao, Jürgen

--
Jürgen Hermann, Developer (jhe@webde-ag.de)
WEB.DE AG, http://webde-ag.de/



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org