Re: getElementsByTagName

At 07/08/98 10:35 AM , Peter Pierrou wrote:
>I am developing a DOM api in C++ for our product the SGML/XML editor
Documentor and I am
>a bit confused about the Element::getElementsByTagName method.
>
>In the specification:
>
>"Parameters 
>   tagname
>      The name of the tag to match on. If the string "*" is given, this
method will
>      return all elements in the document"
>
>Does it really mean that "*" returns all elements in the Document, even
the elements in the
>parent chain of the element instance, or does it mean all elements
descending the
>element instance?

All sub-elements of the Element in this case, not the document (that's what
Document.getElementsByTagName is for).

>Also: I presume that the method is recursive, please tell me if i am wrong.

If by recursive you mean does it do the entire sub-tree, then yes.


Lauren

Received on Friday, 7 August 1998 13:22:08 UTC