Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 5008 invoked from network); 20 Jan 2007 19:20:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jan 2007 19:20:17 -0000 Received: (qmail 29993 invoked by uid 500); 20 Jan 2007 19:20:10 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 29862 invoked by uid 500); 20 Jan 2007 19:20:08 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 29851 invoked by uid 99); 20 Jan 2007 19:20:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Jan 2007 11:20:08 -0800 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of parrott.sarah@googlemail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Jan 2007 11:19:59 -0800 Received: by ug-out-1314.google.com with SMTP id h2so649590ugf for ; Sat, 20 Jan 2007 11:19:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=ltkpsF9cSaOcznUqzLX8V9EgVdOHdM2xFTWNLjY0xyv+3OK0ibTAqw/+vOQ7j60++a2dVvTDTDdW0lWbOApYJU4z+4yLdDK8KR6LmPesYXBh9FMvAgRi7B5+qAGSDezRISGR+Dv2eJYvNYB6uiTtGAvvtGAL8O/lvlmHKaOp5hc= Received: by 10.67.22.2 with SMTP id z2mr5027586ugi.1169320778195; Sat, 20 Jan 2007 11:19:38 -0800 (PST) Received: by 10.66.240.9 with HTTP; Sat, 20 Jan 2007 11:19:38 -0800 (PST) Message-ID: <23c59e280701201119r4c9e5e44pae52db9d72382937@mail.gmail.com> Date: Sat, 20 Jan 2007 19:19:38 +0000 From: "Sarah Parrott" To: "tomcat users" Subject: Change the encoding format of xml outpu MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_160592_4267812.1169320778091" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_160592_4267812.1169320778091 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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 ------=_Part_160592_4267812.1169320778091--