The getParentNode()
method retrieves the parent node of the target node in the DOM tree.
It allows for traversal up the tree structure, providing access to the node that contains the target node. If the current node is the root or does not have a parent, the method will return null
.
Description
public AbstractNode::getParentNode(): ?NodeInterface
Parameters
None
Return Value
The parent node as an instance of NodeInterface
, or null
if no parent exists.
Exceptions
None