tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sarah Parrott" <parrott.sa...@googlemail.com>
Subject Change the encoding format of xml outpu
Date Sat, 20 Jan 2007 19:19:38 GMT
Hi,

 I'm using Tomcat 5.5 from within eclipse, and using java code to create and
save a new xml document on the server. The first line in the xml doc is

<?xml version="1.0" encoding="UTF-16"?>

If I try and view this in eclipse, or parse it using a sax parser, I get the
error 'content not allowed in prolog'. However, I can open it fine in
something like notepad, and if I change the encoding in the file to UTF-8,
it opens fine in eclipse/SAX with no other modifications to the file. How
can I change it so it is written with UTF-8 in the first place? I've tried
looking in the server properties but every reference to encoding I can find
is already set to UTF-8. Is there something I'm missing? Or am I going to
have to do an xslt transformation each time read the xml?

Thanks in advance,
Sarah

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message