[jdom-interest] getChildren

New, Cecil (GEAE) cecil.new at ae.ge.com
Mon Dec 16 12:12:13 PST 2002

the java.util.List.add() method adds to the end of the list.  But there is
another method that will insert.  Per javadocs:

public void add(int index, Object element)
Inserts the specified element at the specified position in this list (optional
operation). Shifts the element currently at that position (if any) and any
subsequent elements to the right (adds one to their indices).

-----Original Message-----
From: Antonello Dell'Armi [mailto:A.Dellarmi at ELIS.ORG]
Sent: Friday, December 13, 2002 4:34 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] getChildren

i have an element accesslist with inside a sequence of instance element.Each
instance consist on 2 different element named watcher and tupleid.

My desire is to add a new element watcher. So i do:
List watchers = instance.getChildren("watcher");

Element newatcher = new Element("watcher");

but i get:


that it's wrong!!!Where i do the mistake?
To control your jdom-interest membership:

More information about the jdom-interest mailing list