[xml] xmlParseChunk with SAX?



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".


Thanks,
FS






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