The getParentElement() method retrieves the parent element of the target node, if it exists.
This method is specifically for nodes that are elements, and it returns an instance of
ElementInterface.
Description
public AbstractNode::getParentElement(): ?ElementInterface
Parameters
None
Return Value
An instance of ElementInterface representing the parent element, or null if no parent element exists.
Exceptions
None