bug in aelfred parser?

Maarten Coene <[email protected]>
Newsgroups gmane.comp.java.classpath.extensions.xml
Message-ID <[email protected]>
Hi,

I'm having a problem with the latest sources of the Aelfred parser. I 
cannot parse this peace of xml:

<root attr="Hello There &lt;&gt;&amp;" />

For instance, the following code throws an exception:
    public void testAmp() throws Exception {
        String xml = "<root attr=\"Hello There &lt;&gt;&amp;\" />";
        InputStream in = new ByteArrayInputStream(xml.getBytes());
       
        SAXParserFactory factory = new JAXPFactory();
        factory.newSAXParser().parse(in, new DefaultHandler());
    }

the exception is:
org.xml.sax.SAXParseException: & must be encoded either as &amp; or as 
&#38;#38
    at gnu.xml.aelfred2.SAXDriver.fatal(SAXDriver.java:985)
    at gnu.xml.aelfred2.XmlParser.error(XmlParser.java:392)
    at gnu.xml.aelfred2.XmlParser.readLiteral(XmlParser.java:2535)
    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)

This problem is introduced recently, with older Aelfred code (3 months 
old), I didn't have the problem...

Is there something wrong with the aelfred code, or is there a problem 
with my xml document?

regards,
Maarten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.