<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
<TITLE>JDOM trivia: Element.isAncestor method</TITLE>
</HEAD>
<BODY>
<FONT SIZE="3">I know Beta 10 is now available, but thought I'd raise this point (raised to me) against Beta 9 just in case...</FONT><BR>
<FONT SIZE="2"><BR>
The following javadoc for </FONT><BR>
<BR>
<FONT SIZE="2">class org.jdom.Element </FONT><BR>
<BR>
<FONT SIZE="2"> /**<BR>
* Determines if this element is the ancestor of another element.<BR>
*<BR>
* @param element <code>Element</code> to check against<BR>
* @return <code>true</code> if this element is the ancestor of the<BR>
* supplied element<BR>
*/<BR>
public boolean isAncestor(Element element) {</FONT><BR>
<BR>
<FONT SIZE="2">is remarkable because the method does just the opposite :-)</FONT><BR>
<BR>
<FONT SIZE="2">e.g.</FONT><BR>
<BR>
<FONT SIZE="2">parent.isAncestor(child) is FALSE<BR>
child.isAncestor(parent) is TRUE <BR>
</FONT><BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Phil Weighill-Smith <<A HREF="mailto:phil.weighill-smith@volantis.com"><U>phil.weighill-smith@volantis.com</U></A>><BR>
Volantis Systems
</TD>
</TR>
</TABLE>
</BODY>
</HTML>