[jdom-interest] Removing default encoding.
Rick Nucci
rick_nucci at boomi.com
Thu Aug 9 12:07:01 PDT 2001
Hi Tasso,
try --> XMLOutputter.setOmitEncoding(boolean omit)
-Rick
-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Tasso Angelidis
Sent: Thursday, August 09, 2001 2:47 PM
To: 'jdom-interest at jdom.org'
Subject: [jdom-interest] Removing default encoding.
Hi I am creating a document...
public String createErrorMessage(String code, String message)
{
Element root = new Element("TMSTN");
Element error = new Element("Error");
Element errCode = new Element("Code");
Element errMessage = new Element("Message");
root.addContent(error);
error.addContent(errCode);
error.addContent(errMessage);
errCode.addContent(code);
errMessage.addContent(message);
Document doc = new Document(root);
XMLOutputter output = new XMLOutputter();
StringWriter writer = new StringWriter();
try
{
output.output(doc, writer);
}
catch(Exception e)
{}
return(writer.toString());
}
The output...
<?xml version="1.0" encoding="UTF-8" ?>
<TMSTN>
<Error>
<Code>100</Code>
<Message>Insert successfull.</Message>
</Error>
</TMSTN>
Is it possible to not print the default encoding >>>> encoding="UTF-8"
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
More information about the jdom-interest
mailing list