Re: [xml] xmlParseChunk with SAX?



On Tue, Oct 12, 2004 at 12:12:30AM -0400, Fengguang Song wrote:
Hi,

I used xmlCreatePushParserCtxt(&SAXhandler,...) and xmlParseChunk() to 
parse an xml doc. I'm not sure how the ParseChunk works? But it's very 
likely that the borders of the chunks occur anywhere, maybe splitting a 
word or even an integer. Sometimes the parsing result is correct, 
sometimes not. Now I'm confronting a problem with the following XML doc:

<metric id="8">
  <name>Wait at N x N</name>
  <uom>sec</uom>
  <url></url>
  <descr><![CDATA[<html>
<h3>MPI Wait at N x N</h3>


Collective communication operations that send data from all processes
to all processes (i.e., n-to-n) exhibit an inherent synchronization
among all participants, that is, no process can finish the operation
until the last process has started it. This metric covers the time
spent in n-to-n operations until all processes have reached it.
</html>


]]></descr>
</metric>


I can't get the whole part of the CDATA(a few words at the beginning is 
lost). But it becomes correct if I make it shorter. Is it related to the 
chunk size? Some rumors are "80 bytes" or "76 bytes".

  Please bugzilla this, try with latest version first using the testSAX
tool coming with the code source and provide the file as an attachment.

  thanks,

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team 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]