Hi,

I tried to extract some data with xpathEval. Path contain more than
100,000 elements.

doc = libxml2.parseFile("test.xml")
ctxt = doc.xpathNewContext()
result = ctxt.xpathEval('//src_ref/@editions')
doc.freeDoc()
ctxt.xpathFreeContext()

this will stuck in following line and will result in high usage of
CPU.
result = ctxt.xpathEval('//src_ref/@editions')

Any suggestions to resolve this.

Is there any better alternative to handle large documents?

Kanch
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to