[jdom-interest] How do add a child?

Simon simonjgauld at yahoo.com
Mon Nov 12 14:52:05 PST 2001


Kevin,

Look at the Element javadoc, specifically the
overloaded addContent(...) methods

.s




 --- kevin.schmidt at convergys.com wrote: > 
> I am using JDOM beta 7 and am trying to add one
> Element to be a child of
> another.
> I dont see an addChild method in the API for
> Element.  Also, it wont let me
> call setParent
> because it is a protected method.  The only way I
> can see to do it is like
> this:
> 
> List childs = elem1.getChildren();
> childs.add(elem2);
> elem1.setChildren(childs);
> 
> This seems very roundabout though.  I must be
> missing something!  Help!
> 
>      -Kevin Schmidt
>      Cincinnati, OH
> 
> 
> --
> 
> NOTICE:  The information contained in this
> electronic mail transmission is
> intended by Convergys Corporation for the use of the
> named individual or
> entity to which it is directed and may contain
> information that is
> privileged or otherwise confidential.  If you have
> received this electronic
> mail transmission in error, please delete it from
> your system without
> copying or forwarding it, and notify the sender of
> the error by reply email
> or by telephone (collect), so that the sender's
> address records can be
> corrected.
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



More information about the jdom-interest mailing list