[jdom-interest] First pass at Namespace revision[eg]

Rosen, Alex arosen at silverstream.com
Mon Apr 2 10:11:13 PDT 2001

I'm much less concerned about changing the namespace of an element as I am
about creating or finding elements in namespaces. When parsing a tree like:

<element xmlns="http://foo">
      <child1 />
      <child2 />

I think it's perfectly natural to want to call getChild("child1"), but this
will return null. And trying to create this tree with new Element("child1") and
have it come out wrong. This will lead to confusion.

I don't want to push on a decision that was made a long time ago, before I got
here, that would require rewriting a lot of code. With the existing API, I
think we should add a warning to the Element JavaDoc explaining how namespaces
are handled in JDOM. I'd be willing to try to come up with the wording.


More information about the jdom-interest mailing list