[jdom-interest] changing / controlling the order of adding children
to Elements
Jason Hunter
jhunter at collab.net
Thu Mar 29 21:08:50 PST 2001
The answer to this is the same as for the FAQ question, "How do I add a
PI or Comment before the root element?" See
http://jdom.org/docs/faq.html.
-jh-
Anand Sankaran wrote:
>
> Hi all
>
> Can we control the 'location' in which we add children to an
> Element?
>
> For instance,
>
> Element rootElement = ....;
>
> rootElement.addContent(x);
> addATonOfElements(rootElement);
>
> //DTD says that y should be before
> //addATonOfElements and immediately after x
>
> rootElement.addContent(y);
>
> If my business logic forces me to add 'y' as a child only after
> addATonOfElements() is called but my DTD defines this element to
> be added before addATonOfElements(), how do I handle this?
>
> Any help would be appreciated.
>
> Thanks
>
> - anand
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list