JDOM Children Elements and Namespaces

Discussion in 'XML' started by gimme_this_gimme_that@yahoo.com, Apr 21, 2005.

  1. Guest

    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.
     
    , Apr 21, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wendy S
    Replies:
    1
    Views:
    6,469
    Darren Davison
    Aug 5, 2003
  2. Bernd Oninger
    Replies:
    4
    Views:
    12,728
    GIMME
    Jun 21, 2004
  3. Tinker
    Replies:
    4
    Views:
    5,447
    Harry Bosch
    Oct 9, 2005
  4. Bernd Oninger
    Replies:
    3
    Views:
    2,928
    GIMME
    Jun 21, 2004
  5. Replies:
    4
    Views:
    210
Loading...

Share This Page