• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error while validating xml file.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai all,
I am getting following exception when i am trying to validate an xml document using DOM PARSER.
Failed to validate the XML. org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xff) was found in the prolog of the document.

Thanks in advance.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is pretty self explanatory - XML expects to see only valid Unicode characters. Possible sources of invalid characters that I can think of right off-hand:
1. MS Word "smart" punctuation where text is cut and pasted from a Word DOC into XML.
2. Reading the input file with the wrong character encoding.

A programmer's editor that can show Hex values of characters is invaluable in tracking down this sort of thing. I use UltraEdit-32 - it is not free but for something I use all the time it is worth evey dime.
Bill
 
raghuveer mandal
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem got solved. Thanks for your advice.
Regards
Raghuveer Mandal.
[ June 06, 2005: Message edited by: raghuveer mandal ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic