You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by David Bertoni <db...@apache.org> on 2008/05/20 19:24:06 UTC

Re: DOM element data retrieval?

Barry, Gregory P. wrote:
> Is there an interface/method available to access the DOM Document/tree 
> for retrieval of data based on tag or tree hierarchy (e.g. is there a 
> method were you can pass in the subtree tag name with an element name to 
> retrieve the data something on the order of 
> getValue(SubTreeName.TagName). Or does this need written in the 
> application that is using the DOM parser using the traversal methods?
Please take a look at DOMElement::getElementsByTagName() and 
DOMElement::getElementsByTagNameNS().  That, along with 
DOMNode::getTextContent() should do what you want.

> I also sent to c-dev in the event this is a dev question.
In the future, please don't cross-post.  The user list is the 
appropriate forum for this sort of question, and you'll get redirected 
otherwise.

Dave

RE: DOM element data retrieval?

Posted by "Barry, Gregory P." <Ba...@westinghouse.com>.
Thanks Dave. In future, I will also post to one group.

-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: Tuesday, May 20, 2008 1:24 PM
To: c-dev@xerces.apache.org
Cc: c-users@xerces.apache.org
Subject: Re: DOM element data retrieval?

Barry, Gregory P. wrote:
> Is there an interface/method available to access the DOM Document/tree

> for retrieval of data based on tag or tree hierarchy (e.g. is there a 
> method were you can pass in the subtree tag name with an element name
to 
> retrieve the data something on the order of 
> getValue(SubTreeName.TagName). Or does this need written in the 
> application that is using the DOM parser using the traversal methods?
Please take a look at DOMElement::getElementsByTagName() and 
DOMElement::getElementsByTagNameNS().  That, along with 
DOMNode::getTextContent() should do what you want.

> I also sent to c-dev in the event this is a dev question.
In the future, please don't cross-post.  The user list is the 
appropriate forum for this sort of question, and you'll get redirected 
otherwise.

Dave

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


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