Tilde not recognised in XML public identifier
Posted
by phantom-99w
on Stack Overflow
See other posts from Stack Overflow
or by phantom-99w
Published on 2010-05-14T13:25:35Z
Indexed on
2010/05/14
14:04 UTC
Read the original article
Hit count: 226
Hi everyone
I found an interesting bug and wanted to know you think. Brief background: I've written a custom DTD and an example XML file (both UTF-8). I have now implemented a SAX parser in Java which I want to test. I got a SAXException complaining "An invalid XML character (Unicode: 0x7e) was found in the public identifier". Now, the URL of my DTD does contain a tilde character (unicode 0x7e). If I move the DTD file to another URL which does not contain a tilde, then my example XML file parses without causing a SAXException.
So I have a work-around for this problem, but I am interested to know: why does this happen? Is this a bug? If so, is it with UTF-8, Java (1.6.0_18 x86), Windows (Server 2008 R2 x86_64) or what? Or is this one of those little obscure nuances of the XML 1.0 specification?
© Stack Overflow or respective owner