wood burning stoves*
The moose likes Java in General and the fly likes SAX Parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "SAX Parser" Watch "SAX Parser" New topic
Author

SAX Parser

Rudy Simon Yeung
Greenhorn

Joined: Jun 06, 2003
Posts: 15
I have a program using SAXParserFactory and SAXParser classes to parse an xml file. The XML file is now further enhanced that could contain double bytes (e.g. Chinese characters). How should I make use of the SAX classes to parse the xml file saved in UTF-8 format?
Rudy Simon Yeung
Greenhorn

Joined: Jun 06, 2003
Posts: 15
I get the answer myself. Simply just change the encoding part of the xml header into "UTF-8".
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Originally posted by Rudy Simon Yeung:
I get the answer myself. Simply just change the encoding part of the xml header into "UTF-8".


Glad we could help Rudy.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SAX Parser
 
Similar Threads
JSP and XML
creating objects from an XML file
SAX parser and validation
Write an XML file with SAX?
xml as byte array