Microsoft SDK for Java

getParent

This method of the Element interface retrieves the parent of this element. Every element in the tree—except the Document itself—has a parent.

Syntax

public Element getParent();

Return Value

Returns the parent element or null if at the root of the tree.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.