संपादित करें

इसके माध्यम से साझा किया गया


XPathNavigator.SelectChildren Method

Definition

Selects all the child nodes of the current node that match the selection criteria.

Overloads

SelectChildren(XPathNodeType)

Selects all the child nodes of the current node that have the matching XPathNodeType.

SelectChildren(String, String)

Selects all the child nodes of the current node that have the local name and namespace URI specified.

SelectChildren(XPathNodeType)

Source:
XPathNavigator.cs
Source:
XPathNavigator.cs
Source:
XPathNavigator.cs

Selects all the child nodes of the current node that have the matching XPathNodeType.

public:
 virtual System::Xml::XPath::XPathNodeIterator ^ SelectChildren(System::Xml::XPath::XPathNodeType type);
public virtual System.Xml.XPath.XPathNodeIterator SelectChildren (System.Xml.XPath.XPathNodeType type);
abstract member SelectChildren : System.Xml.XPath.XPathNodeType -> System.Xml.XPath.XPathNodeIterator
override this.SelectChildren : System.Xml.XPath.XPathNodeType -> System.Xml.XPath.XPathNodeIterator
Public Overridable Function SelectChildren (type As XPathNodeType) As XPathNodeIterator

Parameters

type
XPathNodeType

The XPathNodeType of the child nodes.

Returns

An XPathNodeIterator that contains the selected nodes.

Examples

For an example of selecting ancestor, child and descendant nodes, see SelectAncestors.

Remarks

The SelectChildren method has no effect on the state of the XPathNavigator.

See also

Applies to

SelectChildren(String, String)

Source:
XPathNavigator.cs
Source:
XPathNavigator.cs
Source:
XPathNavigator.cs

Selects all the child nodes of the current node that have the local name and namespace URI specified.

public:
 virtual System::Xml::XPath::XPathNodeIterator ^ SelectChildren(System::String ^ name, System::String ^ namespaceURI);
public virtual System.Xml.XPath.XPathNodeIterator SelectChildren (string name, string namespaceURI);
abstract member SelectChildren : string * string -> System.Xml.XPath.XPathNodeIterator
override this.SelectChildren : string * string -> System.Xml.XPath.XPathNodeIterator
Public Overridable Function SelectChildren (name As String, namespaceURI As String) As XPathNodeIterator

Parameters

name
String

The local name of the child nodes.

namespaceURI
String

The namespace URI of the child nodes.

Returns

An XPathNodeIterator that contains the selected nodes.

Exceptions

null cannot be passed as a parameter.

Examples

For an example of selecting ancestor, child and descendant nodes, see SelectAncestors.

Remarks

If String.Empty is specified as the name parameter, all child nodes that belong to the specified namespace URI are selected. If String.Empty is specified as the namespaceURI parameter, all child nodes with the specified local name that belong to no namespace are selected. If both the local name and namespace URI parameters are String.Empty, all child nodes that belong to no namespace are selected.

The SelectChildren method has no effect on the state of the XPathNavigator.

See also

Applies to