Re: [xml] parsing problem



On Mon, Jan 30, 2006 at 10:20:56PM +0000, Graham Bennett wrote:
Hi all,

I'm having a problem parsing the attached document with libxml 2.6.22.
My application uses the SAX2 interface in push mode, but for some reason 
I'm only able to reproduce it using xmllint --stream:

$ xmllint --stream badcomment.xml
badcomment.xml:17: parser error : Comment not terminated
<!-->Char</nt>* ']]&gt;' <nt def='NT-Char'>Char</nt>*)
'&comc;&gt;'</rhs>--
                    ^
badcomment.xml : failed to parse

The test case is somewhat fragile (but I'm fairly sure it's well-formed) 
- if I try to cut it down to a smaller doc it doesn't happen.

  Okay I finally reproduced it after guessing where the problem was
(basically the stream code was looking for the --> sequence from the
start of the comment and not from the start of the content of the comment)
Fix is in CVS, I also added the test file to the regression suite.

I'm
wondering if it's exposing some buffering problem in the parser.

  Actually no, it's 'just' a streaming parser bug.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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