pugixml.pugi.XMLNodeΒΆ
- class pugixml.pugi.XMLNode
Bases:
pybind11_object
A light-weight handle for manipulating nodes in DOM tree.
Members:
__bool__
(self)Determine if this node is not empty.
__eq__
(self, other)Return self == other.
__ge__
(self, other)Return self >= other.
__gt__
(self, other)Return self > other.
__hash__
(self)Return the hash value (unique for handles to the same object).
__init__
(*args, **kwargs)Overloaded function.
__le__
(self, other)Return self <= other.
__lt__
(self, other)Return self < other.
__ne__
(self, other)Return self != other.
append_attribute
(self, name)Add a new attribute with the specified name to the end of the list of attributes for this node.
append_buffer
(self, contents, size[, ...])Parse a buffer as a fragment of the XML document and appends all nodes as children of the current node.
append_child
(*args, **kwargs)Overloaded function.
append_copy
(*args, **kwargs)Overloaded function.
append_move
(self, moved)Move the specified node as the last child of this node.
attribute
(*args, **kwargs)Overloaded function.
attributes
(self)Return an iterator of attributes for this node.
child
(self, name)Return a child node with the specified name.
child_value
(*args, **kwargs)Overloaded function.
children
(*args, **kwargs)Overloaded function.
empty
(self)Determine if this node is empty.
find_attribute
(self, pred)Find the attribute using predicate.
find_child
(self, pred)Find the child node using predicate.
find_child_by_attribute
(*args, **kwargs)Overloaded function.
find_node
(self, pred)Find the node from subtree using predicate.
first_attribute
(self)Return the first attribute in the list of attributes for this node.
first_child
(self)Return the first child node.
first_element_by_path
(self, path[, delimiter])Search for a node by path consisting of node names and '.' or '..' elements.
hash_value
(self)Return the hash value (unique for handles to the same object).
insert_attribute_after
(self, name, attr)Insert a new attribute with the specified name after attr in the list of attributes for this node.
insert_attribute_before
(self, name, attr)Insert a new attribute with the specified name before attr in the list of attributes for this node.
insert_child_after
(*args, **kwargs)Overloaded function.
insert_child_before
(*args, **kwargs)Overloaded function.
insert_copy_after
(*args, **kwargs)Overloaded function.
insert_copy_before
(*args, **kwargs)Overloaded function.
insert_move_after
(self, moved, node)Move the specified node after node in the list of children.
insert_move_before
(self, moved, node)Move the specified node before node in the list of children.
internal_object
(self)Return the internal object.
last_attribute
(self)Return the last attribute in the list of attributes for this node.
last_child
(self)Return the last child node.
name
(self)Return the node name.
next_sibling
(*args, **kwargs)Overloaded function.
offset_debug
(self)Return the node offset in the parsed file/string for debugging purposes.
parent
(self)Return the parent node.
path
(self[, delimiter])Return the absolute node path from the root as a text string.
prepend_attribute
(self, name)Add a new attribute with the specified name to the top of the list of attributes for this node.
prepend_child
(*args, **kwargs)Overloaded function.
prepend_copy
(*args, **kwargs)Overloaded function.
prepend_move
(self, moved)Move the specified node as the first child of this node.
previous_sibling
(*args, **kwargs)Overloaded function.
print
(self, writer[, indent, flags, ...])Save a single subtree to writer.
remove_attribute
(*args, **kwargs)Overloaded function.
remove_attributes
(self)Remove all attributes from the node.
remove_child
(*args, **kwargs)Overloaded function.
remove_children
(self)Remove all child nodes of the node.
root
(self)Return the root of DOM tree this node belongs to.
select_node
(*args, **kwargs)Overloaded function.
select_nodes
(*args, **kwargs)Overloaded function.
set_name
(*args, **kwargs)Overloaded function.
set_value
(*args, **kwargs)Overloaded function.
text
(self)Return the text object for the current node.
traverse
(self, walker)Traverse subtree recursively with
XMLTreeWalker
.type
(self)Return the node type.
value
(self)Return the node value.