getting element text?

Lev Lvovsky <[email protected]> Mon, 25 Jun 2007 17:13:17 -0700
Newsgroups gmane.text.xml.xerces-p.devel
Message-ID <[email protected]>
I'm addmitedly new to DOM, but I'm a bit confused by what should seem  
to work based on the W3 DOM tutorial.

if I have a Xerces::DOMElement, and I want to get the value of that  
element, one would assume that getNodeValue would get me the text  
string within the element tags:

<Element>Some Text</Element>

So if I have a DOMNode where getNodeType() returns 1, and getNodeName  
returns 'Element', shouldn't getNodeValue return 'Some Text'?  I'm  
consistently getting emtpy strings for any Element that I use the  
getNodeValue method on.  getTextContent gives me the text, however I  
would think that that's the wrong way to go about things.


Any help would be appreciated!

thanks,
-lev