Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An invalid XML character found during parsing

 
gang lee
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic