SourceForge has been redesigned. Learn more.
Close

#68 SAX fails to read character entity 

closed-rejected
nobody
5
2007-08-28
2007-06-19
Anonymous
No

Hi,

when using SAX via JAXP the following code throws a org.xml.sax.SAXParseException: Character reference "&#xB" is an invalid XML character

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = factory.newDocumentBuilder();

Document doc = docBuilder.parse(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?><tag>some&#xB;thing</tag>".getBytes()) );

But the character entity &#xB; is valid according to the original XML 1.0 spec. It works however if I change the XML Version to 1.1, but the XML 1.1 spec has not really changed at that point.

See:
http://www.w3.org/TR/1998/REC-xml-19980210#sec-references
http://www.w3.org/TR/xml11/#sec-references

Concerning the plattform and versions: Im using WinXP Prof. and a Java 6 JDK (version: build 1.6.0_01-b06). I dont know how to get the SAX version, but I figured the serialVersionUID of the thrown SAXParseException: -5651165872476709336

cheers,
joachim

Discussion

  • David Megginson

    David Megginson - 2007-08-28
    • status: open --> open-rejected
     
  • David Megginson

    David Megginson - 2007-08-28

    Logged In: YES
    user_id=232602
    Originator: NO

    SAX doesn't actually include a parser -- you need to file this bug against JAXP.

     
  • David Megginson

    David Megginson - 2007-08-28

    Logged In: YES
    user_id=232602
    Originator: NO

    SAX doesn't actually include a parser -- you need to file this bug against JAXP.

     
  • David Megginson

    David Megginson - 2007-08-28

    Logged In: YES
    user_id=232602
    Originator: NO

    SAX doesn't actually include a parser -- you need to file this bug against JAXP.

     
  • David Megginson

    David Megginson - 2007-08-28
    • status: open-rejected --> closed-rejected
     

Log in to post a comment.