Fwd: getting element text?
"Jason Stewart" <[email protected]> Sun, 1 Jul 2007 19:55:34 +0530
| Newsgroups | gmane.text.xml.xerces-p.devel |
|---|---|
| Message-ID | <41c1ade50707010725y2598b945uae4028a29fdefff6__15961.9019403637$1183299962$gmane$org@mail.gmail.com> |
Hey Lev, I'm forwarding your query to the Xerces-C guys - maybe there is something different with how Xerces is implementing the DOM3 API? Cheers, jas. ---------- Forwarded message ---------- From: Lev Lvovsky <[email protected]> Date: Jun 26, 2007 5:43 AM Subject: getting element text? To: [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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]