Sax Parsers
According to XML specifications, character range #xF900 to #xFFFE is not valid. But I tried to use some characters in this range and my SAXParser did not throw any error (I'm using SAX 2.0 - Xerces 3.2.1- XML4J). Does the SAX Parser not follow all the specifications or is it a bug in the parser?

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to keep you informed on recent service-oriented architecture (SOA) and SOA-related topics such as integration, governance, Web services, Cloud and more.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSOA.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSOA.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Implementing restrictions on Unicode character ranges is one area where parsers differ a lot - especially in the area of characters that are permitted within tag and attribute names.

Best to check the documentation for your parser.

Note also that it depends how you encoded the characters in your XML. If you use character entity references for example (豈) these are fine in PCDATA. Other characters can be valid in one encoding (such as ISO-8859-1) supported by many parsers, but illegal in other encodings i.e. US-ASCII.

This was first published in July 2002