[jdom-interest] Element.setChildren(Element.getChildren())

Markus Alin markus at swissrisk.com
Wed Jan 16 08:08:10 PST 2002

BlankDear all!!

 I have read an XML-file with the "org.apache.xerces.parsers.SAXParser" into
a JDOM tree. I can access all the Elements and Attributes in the tree
perfeclty with the different get functions that org.jdom.Element provides,
but when trying to move a set of Elements to another parent Element the
program throws an org.jdom.IllegalAddException. Typical the code I try to
execute looks like:

Element rootElement = document.getRootElement();
Element otherElement = new Element(<anyName>,<namepaceAsSameAsRootElement>);

Why isn't this working??

Thanks, Markus


      Markus Alin tel: +41 1 455 70 00
      Swissrisk AG fax: +41 1 455 70 01
      Räffelstrasse 32 mobile: +41 79 706 58 90
      8045 Zürich mail: markus at swissrisk.com
      Switzerland home: www.swissrisk.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020116/4f9c8abd/attachment.htm

More information about the jdom-interest mailing list