[jdom-interest] & in namespace

Elliotte Harold elharo at metalab.unc.edu
Tue May 2 04:39:39 PDT 2006

Deshpande, Aniruddha wrote:
> Hello,
> I use SAXBuilder to parse and add an extra element to an existing WSDL 
> file. I am facing problem for WSDLs which have & in their namespace 
> declaration. When I use XMLOutputter to write back the changed WSDL 
> “&” gets replaced with “&”.

I don't believe the namespace URI contains &. I suspect it contains 
& which is escaped as & in XML contexts. The distinction is 
critical. However it does sound like you may have uncovered a serious 
bug in JDOM if indeed JDOM does not escape such ampersands when 
reserializing. Do you have a reproducible test case?

Elliotte Rusty Harold  elharo at metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!

More information about the jdom-interest mailing list