AbstractNode::getParentElements

The getParentElements() method retrieves all ancestor elements of the current node, up to the root of the document tree, excluding non-element nodes.

Description

public AbstractNode::getParentElements(): ElementList

Parameters

None

Return Value

Returns an ElementList containing all ancestor elements of the current node.

The list is ordered from the immediate parent element to the root element.

Exceptions

None

Source Code
If you find this project useful, consider leaving a on GitHub! Thank you!