JDOM Children Elements and Namespaces

  • Thread starter gimme_this_gimme_that
  • Start date
G

gimme_this_gimme_that

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top