You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Christian Landbo Frederiksen <CL...@Ementor.dk> on 2007/05/07 17:08:18 UTC

XmlHelper.save and encoding

Hi
 
When calling helperContext.getXMLHelper().save(dataObject, namespace,
rootElement) I get xml with encoding = ASCII.
 
Is there a way to make this UTF-8 or is the problem in the dataObject
given?
 
/Chr
 
 

RE: XmlHelper.save and encoding

Posted by Christian Landbo Frederiksen <CL...@Ementor.dk>.
Yes there is. Use some of the other methods of the XMLHelper in
combination:
 
  XMLDocument xmlDocument =
helperContext.getXMLHelper().createDocument(dataObject, namespace,
rootElement);
  xmlDocument .setEncoding("UTF-8");
  helperContext.getXMLHelper().save(xmlDocument, stream, null);
 
where stream is an outputstream.
 
/Chr
 

________________________________

From: Christian Landbo Frederiksen 
Sent: 7. maj 2007 17:08
To: 'tuscany-user@ws.apache.org'
Subject: XmlHelper.save and encoding


Hi
 
When calling helperContext.getXMLHelper().save(dataObject, namespace,
rootElement) I get xml with encoding = ASCII.
 
Is there a way to make this UTF-8 or is the problem in the dataObject
given?
 
/Chr