Hi there, I'm trying to use Crimson (via JAXP 1.1) to parse some XML files and it seems to throw exceptions if a file begins with an XML declaration. I've tried both 1.1.1 (from the JAR which comes with Sun's JAXP 1.1 download) and 1.1.2beta2 (which seems to work fine as a direct replacement for the above, without me needing to upgrade to JDK 1.4). This isn't urgent, as I don't currently care too much about the XML decls, but it seems like a pretty fundamental bug (or error on my part, of course ;-).
In particular, the message it gives is "XML declaration may only begin entities." The stack trace (which I don't have to hand) shows the call path (in org.apache.Crimson.Parser2) as being parseInternal:487 -> maybeMisc:1088 -> maybePI:966 (line numbers from 1.1.2beta2 source code). This suggests that for some reason maybeXmlDecl is failing to recognise the declaration, but I can't understand why. It's just the usual '<?xml version="1.0"?>', it's right at the start of the file, and the file's just a typical Windows file with CR-LF line endings. I can provide a reproducible case on request, I'm sure. Any clues? Is this a known bug? Or is it obvious where I'm going wrong? Thanks in advance, Hugh --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]