This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes An invalid XML character found during parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "An invalid XML character found during parsing" Watch "An invalid XML character found during parsing" New topic
Author

An invalid XML character found during parsing

gang lee
Greenhorn

Joined: Jul 19, 2008
Posts: 12
hi, experts

my question is not about web service, but I think you guys are experts on XML handling:

I use the following code to read a weather info in a XML file,
the XML file is from:
new URL("http://www.google.com/ig/api?weather=dalian&hl=zh-CN")

but following error:
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1f1c61) was found in the value of attribute "data".

the XML file contains chinese characters.
I failed to let my customized code and the xerces to recognizde the encoding of this XML file.

I am beginner and nearly exhausted after failed to fix this issue for several days.

please help & thanks a lot!

PS: if I use the following URL
("http://www.google.com/ig/api?weather=dalian")
then because there is no Chinese characters inside, and everything is ok.
[ July 20, 2008: Message edited by: gang lee ]
gang lee
Greenhorn

Joined: Jul 19, 2008
Posts: 12
this topic closed, see
http://www.coderanch.com/t/411145/java/java/original-purpose-not-read-remote
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: An invalid XML character found during parsing
 
Similar Threads
can not read remote XML correctly, due to encoding issue
Encoding type in J2ME
original purpose of "can not read remote XML correctly, due to encoding issue" thread
HELP! displaying chinese characters
XPath and Modified DOM document object...