classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-xml] bug in aelfred parser?


From: Maarten Coene
Subject: Re: [Classpathx-xml] bug in aelfred parser?
Date: Thu, 05 Aug 2004 11:09:12 +0200
User-agent: Mozilla Thunderbird 0.7.2 (Windows/20040707)

Thanks,

it works now :-)

however I'm having a new problem: I cannot parse this peace of XML:
<img src="http://foo.com/bar?a=123&amp;b=456"; />

For instance, this test fails:
   public void testAmp() throws Exception {
       String xml = "<img src=\"http://foo.com/bar?a=123&amp;b=456\"; />";
       InputStream in = new ByteArrayInputStream(xml.getBytes());
SAXParserFactory factory = new JAXPFactory();
       factory.newSAXParser().parse(in, new DefaultHandler());
   }

This is the stacktrace:
org.xml.sax.SAXParseException: required character (found "=") (expected ";")
   at gnu.xml.aelfred2.SAXDriver.fatal(SAXDriver.java:985)
   at gnu.xml.aelfred2.XmlParser.error(XmlParser.java:370)
   at gnu.xml.aelfred2.XmlParser.error(XmlParser.java:385)
   at gnu.xml.aelfred2.XmlParser.require(XmlParser.java:2838)
   at gnu.xml.aelfred2.XmlParser.readLiteral(XmlParser.java:2533)
   at gnu.xml.aelfred2.XmlParser.parseAttribute(XmlParser.java:1110)
   at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1035)
   at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:417)
   at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:165)
   at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:346)
   at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:299)
   at javax.xml.parsers.SAXParser.parse(Unknown Source)
   at javax.xml.parsers.SAXParser.parse(Unknown Source)

If I remove "b=456" from the attribute value, the document is parsed fine...

regards,
Maarten



Musachy Barroso wrote:

this one was my fault (who would have guessed? :) . It is fixed in cvs
now. It seems like I can't completely rely on the SAX tests to be
sure that I'm not breaking something else, I didn't get any regression
with that bug. I still have one regression pending...but let's get
some sleep first

musachy

On Wed, 4 Aug 2004 23:24:40 +0000, Musachy Barroso <address@hidden> wrote:
your code seems fine, I remember adding that error mesage  a couple of
ago, I'll take a look as soon as I can.

musachy
--
"Hey you! Would you help me to carry the stone?"
                                                        Pink Floyd










reply via email to

[Prev in Thread] Current Thread [Next in Thread]