[jdom-interest] Adding String to Element where String contains an Element in String form
Alex Rosen
arosen at silverstream.com
Tue May 28 11:59:36 PDT 2002
JDOM doesn't really support what you're trying to do.
When you set the text of an element to something like "3 < 4", it gets
escaped to "3 < 4" on output because "3 < 4" would be illegal XML. It
happens that "<whatever/>" would not be illegal XML, but JDOM doesn't know
that.
When you add an Element with a namespace, that namespace must be declared,
because otherwise it's illegal XML.
I'm not sure why you don't want the namespace declaration, because it sounds
like you're trying out output illegal XML, but you might be able to do it by
subclassing XMLOutputter in some way.
Alex
More information about the jdom-interest
mailing list