• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Change document format from UTF-8 to ISO-8859-1

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am creating an xml string, and posting it via http string.

I am trying to change:

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

to:

<?xml version="1.0" encoding="ISO-8859-1">


How do I do this?

The packages I am using are:
org.w3c.dom.*
org.apache.xerces.dom

Can anyone help me accomplish this?

Thanks.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The DOM packages are only half of the equation. All they allow you to do is to parse an XML document into an internal format. The other half of the equation is a serializer, which allows you to serialize the internal format into an XML document. Here is where you would specify the encoding of the new document:
 
reply
    Bookmark Topic Watch Topic
  • New Topic