File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes ISO8859_1 Encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "ISO8859_1 Encoding" Watch "ISO8859_1 Encoding" New topic
Author

ISO8859_1 Encoding

Guruprasad Kateel
Greenhorn

Joined: Jul 10, 2003
Posts: 16
Hi,
We have a requirement to parse an xml string having an encoding style "ISO8859_1" using a xalan dom parser. While parsing the xml, an exception is thrown indicating this encoding style is not supported:
org.xml.sax.SAXParseException: The encoding "ISO8859_1" is not supported.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:546)
at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:195)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)

Should i use a different parser which supports this style, or should i remove the encoding sytle from the xml string before parsing?
Thanks in Advance
Prasad
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I believe you mean "ISO-8859-1" encoding...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ISO8859_1 Encoding