[jdom-interest] HELP: I want <CUSTOMER>. I get: &lt;CUSTOMER &gt;

Steve Taplin steve.taplin at chp.co.uk
Thu Nov 15 06:31:33 PST 2001


Hello,
            I am currently converting a web service from using xerces 1.2 to
jdom (beta 7).
Additionally, I have moved the project from JBuilder5 to IBM WebSphere
Application Developer (Beta Version).
Might sound daft but WSAD is excellent at creating and testing web services.
Unfortunately,  all DOM output (i.e. Xerces and JDom) is now producing,
e.g.:
 
&lt; CUSTOMER &gt;
 
instead of
 
<CUSTOMER>
 
Web browsers love it.  My client app doesn't!
 
I have tried different encodings to no avail.  Any Ideas?
 
The document is built purely from scratch within the class (e.g. not parsed
in).  The outputter fragment is as follows:
 
      private String docToString(Document doc) {
 
            StringWriter stringOut = new StringWriter();
            XMLOutputter outputter = new XMLOutputter(" ", true);
            outputter.setEncoding("ISO-8859-1"); //tried without this, i.e.
UTF-8
            outputter.setOmitDeclaration(true);
          try {
                  outputter.output(doc, stringOut);       
            } catch (Exception e) {
                  e.printStackTrace();
            }
            return stringOut.toString();
      }
 
 
Regards,
 
Steve.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20011115/e0681544/attachment.htm


More information about the jdom-interest mailing list