Re: XMLParserBuffer returns no element found!!!

Michael B Allen <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
On Wed, 23 Aug 2006 10:08:50 +0530
[email protected] 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/
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.