when using SAX via JAXP the following code throws a org.xml.sax.SAXParseException: Character reference "" 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>something</tag>".getBytes()) );
But the character entity  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.
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
Log in to post a comment.