pugixml.pugi.XPathNode
- class pugixml.pugi.XPathNode
Bases:
pybind11_objectXPath node class (either
XMLNodeorXMLAttribute).Methods
__bool__(self)Determine if this XPath node is not empty.
__eq__(*args, **kwargs)Overloaded function.
__hash____init__(*args, **kwargs)Overloaded function.
__ne__(*args, **kwargs)Overloaded function.
attribute(self)Return the attribute if exists.
node(self)Return the node if exists.
parent(self)Return the parent node.
Member Documentation
- __bool__(self: pugixml.pugi.XPathNode) bool
Determine if this XPath node is not empty.
- Returns:
Trueif the XPath node is not empty,Falseotherwise.
- __eq__(*args, **kwargs)
Overloaded function.
__eq__(self: pugixml.pugi.XPathNode, other: pugixml.pugi.XPathNode) -> bool
Return self == other.
__eq__(self: pugixml.pugi.XPathNode, other: pugixml.pugi.XMLNode) -> bool
Return self == other.
- Parameters:
other – The node to compare.
- Returns:
Trueif the internal objects are the same,Falseotherwise.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pugixml.pugi.XPathNode) -> None
Initialize
XPathNodeas an empty XPath node.__init__(self: pugixml.pugi.XPathNode, node: pugixml.pugi.XMLNode) -> None
Initialize
XPathNodewith the node.__init__(self: pugixml.pugi.XPathNode, attribute: pugixml.pugi.XMLAttribute, parent: pugixml.pugi.XMLNode) -> None
Initialize
XPathNodewith the attribute and its parent node.
- Parameters:
node – The node to evaluate over.
attribute – The attribute to evaluate over.
parent – The parent node of attribute.
- __ne__(*args, **kwargs)
Overloaded function.
__ne__(self: pugixml.pugi.XPathNode, other: pugixml.pugi.XPathNode) -> bool
Return self != other.
__ne__(self: pugixml.pugi.XPathNode, other: pugixml.pugi.XMLNode) -> bool
Return self != other.
- Parameters:
other – The node to compare.
- Returns:
Trueif the internal objects are not the same,Falseotherwise.
- attribute(self: pugixml.pugi.XPathNode) pugixml.pugi.XMLAttribute
Return the attribute if exists.
- Returns:
The attribute if exists, or an empty attribute otherwise.
- node(self: pugixml.pugi.XPathNode) pugixml.pugi.XMLNode
Return the node if exists.
- Returns:
The node if exists, or an empty node otherwise.
- parent(self: pugixml.pugi.XPathNode) pugixml.pugi.XMLNode
Return the parent node.
- Returns:
The parent of node.