[jdom-interest] Element.getChildren() problem

Rodney S. Foley rsfoley at harddollar.com
Wed Aug 29 09:04:17 PDT 2001


When you use:

	List list = doc.getRootElement().getChildren("child");

You are asking for all the Child Elements of the ROOT named "child".

When you use:

	List list = doc.getRootElement().getChild("child").getChildren();

You are asking for the first Child Element of the ROOT called "child" and
then asking for all the Children of that element.

It is working correctly.

-----Original Message-----
From: MarkW [mailto:markw at wilsoncom.de]
Sent: Wednesday, August 29, 2001 8:18 AM
To: Jdom-Interest
Subject: [jdom-interest] Element.getChildren() problem


Hi!
This doesn´t work:
List list = doc.getRootElement().getChildren("child");

it just returns the element with local name "child"

but this does:
List list = doc.getRootElement().getChild("child").getChildren();

Anybody noticed this problem?
Mark Wilson
WILSONCOM.

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com



More information about the jdom-interest mailing list