XmlElement::GetElementsByTagName Method (String^, String^)

 

Returns an XmlNodeList containing a list of all descendant elements that match the specified LocalName and NamespaceURI.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public:
virtual XmlNodeList^ GetElementsByTagName(
	String^ localName,
	String^ namespaceURI
)

Parameters

localName
Type: System::String^

The local name to match. The asterisk (*) is a special value that matches all tags.

namespaceURI
Type: System::String^

The namespace URI to match.

Return Value

Type: System.Xml::XmlNodeList^

An XmlNodeList containing a list of all matching nodes. The list is empty if there are no matching nodes.

The nodes are placed in the order in which they would be encountered in a preorder traversal of the XmlElement tree.

System_CAPS_noteNote

It is recommended that you use the XmlNode::SelectNodes or XmlNode::SelectSingleNode method instead of the GetElementsByTagName method.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: