[jdom-interest] & in namespace
Aniruddha.Deshpande at softwareag.com
Mon May 1 22:45:32 PDT 2006
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 "&".
This happens only with extra namespaces. That is "&" in
targetNameSpace and in rest of the WSDL document remain same, however
"&" in other namespace declarations change.
Here is a simple code snippet that I use:
SAXBuilder builder = new SAX...;
Document doc = Builder.build(InputStream);
// Add some elements to doc
XMLOutputter out = new XMLOut...
"tns" namespce in <wsdl:definitions> has value
<http://abc.com/?a=b&c=d> http://abc.com?a=b&c=d which gets
converted to <http://abc.com/?a=b&c=d> http://abc.com?a=b&c=d. This
results in invalid WSDL document as "&" is a preserved entity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest