[jdom-interest] creating & adding a node at the same time

Jason Hunter jhunter at xquery.com
Wed May 4 19:40:40 PDT 2005


> child = parent.addContent( new Element("foo") );

You can do this, it just returns the parent instead of the child.

> This is actually rather annoying. A single-step
> solution would be much better. Any chance the api
> could be modified to include this?

Nope, I think the Element class is already sprouting enough methods.  :) 
  When you consider all the namespace varieties you need to support, 
every new method idea means a pile of new method signatures.

-jh-



More information about the jdom-interest mailing list