Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > JDOM Children Elements and Namespaces

Reply
Thread Tools

JDOM Children Elements and Namespaces

 
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      04-21-2005
Why is it that this works :

root.getChild("detail",NS).getChild("site-export").getChild("category-list").addContent((Content)c);


But this does not :

Element detail = root.getChild("detail",NS);
detail.getChild("category-list").addContent((Content)c);
// There are no namespace prefixes for elements below detail.

In other words it looks like to get children Elements
when using Namespaces I have to navigate all the way down
to the specific node instead of having JDOM find the nearest
node having the name.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newb: recurse over elements children and disable all form elements SteveKlett@gmail.com Javascript 4 09-20-2006 07:42 AM
java.lang.NoSuchMethodError: org.jdom.Element: method getParent()Lorg/jdom/Element Tinker Java 4 10-09-2005 03:12 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger Java 4 06-21-2004 09:08 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger XML 3 06-21-2004 09:08 PM
Help with JDOM, turn org.jdom.Document -> org.w3c.dom.Document? Wendy S Java 1 08-04-2003 11:48 PM



Advertisments