<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=442413611-05062002><FONT face=Arial color=#0000ff><STRONG>If
you call getChildren(childname) instead, you'll get a list of ALL child elements
with the specified name. You can then access any of them as
required.</STRONG></FONT></SPAN></DIV>
<DIV><SPAN class=442413611-05062002></SPAN><FONT face=Tahoma size=2><SPAN
class=442413611-05062002><STRONG><FONT face=Arial color=#0000ff
size=3> </FONT></STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Tahoma size=2><SPAN
class=442413611-05062002> </SPAN>-----Original Message-----<BR><B>From:</B>
dongst [mailto:jdst12@sohu.com]<BR><B>Sent:</B> Wednesday, June 05, 2002 12:24
AM<BR><B>To:</B> jdom-interest@jdom.org<BR><B>Subject:</B> [jdom-interest] How
can I get the next child element by same name?<BR><BR></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT size=2>hi,all</FONT></DIV>
<DIV><FONT size=2>I use JDom b8,</FONT></DIV>
<DIV><FONT size=2>when I want get a child element,I use code
below:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>org.jdom.element elementA =
elementB.getchild("name1");</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>but how can I get the elementC whose name is "name1" too,
</FONT></DIV>
<DIV><FONT size=2>and it is the next element of elementA, </FONT></DIV>
<DIV><FONT size=2>and elementB is the parent of elementA and
elementC.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>thanks</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>jack dong</FONT></DIV>
<DIV><FONT size=2>jdst12@sohu.com</FONT></DIV></BLOCKQUOTE></BODY></HTML>