[Expat-discuss] XMLParserBuffer returns no element found!!!
Michael B Allen
mba2000 at ioplex.com
Wed Aug 23 07:11:29 CEST 2006
On Wed, 23 Aug 2006 10:08:50 +0530
Shishir.Rawat at rds.co.nz wrote:
> But the second call of same function function() at the end of main
> function before Big while loop returns and prints error sayin:
>
> src/expatls.c :654:DOM_DocumentLS_fread: An XML parser error occured : no
> element found : line 1
Ah, well then it looks like it's reached the end of the stream. Perhaps
you just need to close it an reopen it? DOM_DocumentLS_fread only loads
one "document". If you want to process multiple files you will need to
close and open for each [1].
Mike
[1] If I might be so bold as to guess that you're trying to write an
XMLRPC/SOAP (or some other bastardization of XML) type server, you'll
most definitely want to write your own serialization component that
calls a callback with the DOM_Document for each complete tree and then
writes the resulting DOM_Document back to the socket. Or something like
that. The expatls.c loader implementation is really just for disk files.
--
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/
More information about the Expat-discuss
mailing list