[SAXParser] org.xml.sax.SAXParseException: not a name start character: "U+26"
Emmanuel Engelhart
emmanuel@engelhart.org
Sat Feb 13 11:24:00 GMT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
not sure to be on the right ML to report this behavior, please help me
to find the right place to do it if not... and sorry for the noise.
I use gcj on a LTS Ubuntu:
gcj (Ubuntu 4.4.1-5ubuntu2) 4.4.1
My sample code may be downloaded here as Test.java:
https://bugzilla.wikimedia.org/attachment.cgi?id=7115
and looks like that:
================================
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.helpers.DefaultHandler;
public class Test {
public static void main(String argv[]) {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
DefaultHandler handler = new DefaultHandler() {};
saxParser.parse("test.xml", handler);
} catch (Exception e) {
e.printStackTrace();
}
}
}
================================
I compile it like following:
gcj -o test --main=Test Test.java
My XML file "test.xml" may be downloaded here:
https://bugzilla.wikimedia.org/attachment.cgi?id=7114
By running the the binary I get the following error:
$ ./test
org.xml.sax.SAXParseException: not a name start character: "U+26"
at gnu.xml.stream.SAXParser.parse(libgcj.so.10)
at javax.xml.parsers.SAXParser.parse(libgcj.so.10)
at javax.xml.parsers.SAXParser.parse(libgcj.so.10)
at Test.main(test)
Caused by: javax.xml.stream.XMLStreamException: not a name start
character: "U+26"
at gnu.xml.stream.XMLParser.error(libgcj.so.10)
at gnu.xml.stream.XMLParser.readNmtoken(libgcj.so.10)
at gnu.xml.stream.XMLParser.readNmtoken(libgcj.so.10)
at gnu.xml.stream.XMLParser.readCharData(libgcj.so.10)
at gnu.xml.stream.XMLParser.next(libgcj.so.10)
at gnu.xml.stream.SAXParser.parse(libgcj.so.10)
...3 more
Although the XML should be valid.
Has someone an idea to explain this behavior?
This "bug" impacts the Mediawiki mwdumper SW. T
The related bug (with more details) is available here:
https://bugzilla.wikimedia.org/show_bug.cgi?id=22137
Regards
Emmanuel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkt2i9gACgkQn3IpJRpNWtPy7ACeMKYcXxFh5l1T28KCA2uen5Qs
DOwAoJsTg6aHlEQWFJX1yFR29IJx50/i
=HxoD
-----END PGP SIGNATURE-----
More information about the Java
mailing list