When a parsed XML document begin with one or more whitespace(s), Crimson
fails when it encounters the XML declaration and it returns the
message P-019 : "XML declaration may only begin entities". I've the
problem with the RSS documents generated by 10.am.
So i've added a line in the parseInternal (InputSource input) of
Parse2, here's the code
private void parseInternal (InputSource input)
throws SAXException, IOException
{
if (input == null)
fatal ("P-000");
try {
....
contentHandler.setDocumentLocator (locator);
contentHandler.startDocument ();
....
// Add by Vincent Faidherbe ([EMAIL PROTECTED])
// Because the XML document could start with whitespaces.
// Check RSS feed from 10.am for example ;-)
//
maybeWhitespace();
// end add
maybeXmlDecl ();
....
Now, it's works fine when the document starts with whitespaces.
I don't know if it is a bug but if it is, i think i've fixed it.
--
Vincent Faidherbe
icogs
"Do you think C++ is lovable? Unless you're into SM (Software Masochism), probably
not." (JLG)
---------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]