[Expat-bugs] Junk after document element

Myron Turner mturner at cc.umanitoba.ca
Thu Jul 13 17:16:18 CEST 2006


I'm not a subscriber to the expat bugs list, but I've been developing an 
XML Pull Parser for PHP, using PHP 5 and  expat 1.95.8.  When I run 
tests on earlier versions of expat, for the same XML I will get the 
"junk after document element" error.  I see from google that the xml 
mailing lists are full of questions concerning this error.  I've looked 
briefly at the expat code and see that tokens are passed to an error 
checking function which defaults to a return value of 
XML_ERROR_JUNK_AFTER_DOC_ELEMENT, which could explain why this error 
appears so often.

I've looked through the bug reports and checked the subject headers to 
the expat bugs mailing list archives , but I can't find any reference to 
this problem.  Has this been noticed and silently fixed?  If in fact 
this is a bug in earlier versions of expat I'd like to make an 
accommodation in my own code, in so far as I'm able to determine which 
version of expat or PHP is being used.

Thanks,

Myron Turner

http://www.mturner.org/XML_PullParser/
http://freshmeat.net/projects/xml_pullparser/



More information about the Expat-bugs mailing list