• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Parsing a XML file containing japanese characters

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I am triyng to parse a XML file whoose data contains some japanece characters.when i try to parse and get the data out of it its giving the following exception.
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xa5) was foun
d in the element content of the document.
at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java
:1090)
at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLErr
or(XMLDocumentScanner.java:673)
at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher
.dispatch(XMLDocumentScanner.java:1389)
at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocu
mentScanner.java:396)
at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:975)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:232)
at CreateParser.parse(CreateParser.java:63)
at SAXSample.main(SAXSample.java:22)

Can anybody suggest me a solution on how to handle japance characters in XML files.
I am using xerces parser.
Regards
Ramesh
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found this using Google. Hopefully it will point you in the right direction. This seems to lay out what encodings are used by Xerces.
[ May 21, 2003: Message edited by: John Wetherbie ]
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont think you can have multiple encoded charaters in a single xml document. If you need the japanese characters, they must be included as an external entity with an encoding attribute for the xml declaration in the external file.
 
Squanch that. And squanch this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic