[xml] xmlDoc or xmlNode



hello list.
i have some kind of benchmark question.

for my app i need to parse many little xml nodes...

in case i get a buffer filled with an xml "node" i have to build a 
tree and then analyse it... i can parse the buffer with 

xmlDocPtr ptxmlDocPtr;
ptxmlDocPtr = xmlParseMemory(ptchData, iSize);
xmlFreeDoc(ptxmlDocPtr);

whatever this would happen quite many times...
therefor i thought it might be less waste of cpu by not creating a 
doc eacht time but instead to create/delete a node of a general doc 
with the buffer.

Is it less cpu consuming to create/delete a node each time or does it 

make no difference?
how to parse a buffer directly in a node? i would need a function 
node xmlParseMemoryToParent(doc, parent, ptchData, iSize);

does it exist?

sorry for asking,
ed



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