DekGenius.com
Team LiB   Previous Section   Next Section
Element.getElementsByTagNameNS( ) return descendant elements with the specified name and namespace

Availability

DOM Level 2 Core

Synopsis

Node[] getElementsByTagNameNS(String namespaceURI, 
                              String localName);

Arguments

namespaceURI

The URI that uniquely identifies the namespace of the element.

localName

The identifier that specifies the name of the element within its namespace.

Returns

An array (technically, a NodeList) of Element objects that are descendants of this element and have the specified name and namespace.

Description

This method works like getElementsByTagName( ), except that the tag name of the desired elements is specified as a combination of a namespace URI and a local name defined within that namespace. This method is useful only with XML documents that use namespaces.

See Also

Document.getElementsByTagNameNS( ), Element.getElementsByTagName( )

    Team LiB   Previous Section   Next Section