SelectSingleNode()

XmlNode::SelectSingleNode(const String&) method

Selects the first XmlNode that matches the XPath expression.

SharedPtr<XmlNode> System::Xml::XmlNode::SelectSingleNode(const String &xpath)

Arguments

ParameterTypeDescription
xpathconst String&The XPath expression.

Return Value

The first XmlNode that matches the XPath query or nullptr if no matching node is found.

XmlNode::SelectSingleNode(const String&, const SharedPtr<XmlNamespaceManager>&) method

Selects the first XmlNode that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager.

SharedPtr<XmlNode> System::Xml::XmlNode::SelectSingleNode(const String &xpath, const SharedPtr<XmlNamespaceManager> &nsmgr)

Arguments

ParameterTypeDescription
xpathconst String&The XPath expression.
nsmgrconst SharedPtr<XmlNamespaceManager>&An XmlNamespaceManager to use for resolving namespaces for prefixes in the XPath expression.

Return Value

The first XmlNode that matches the XPath query or nullptr if no matching node is found.

See Also