Re: xpathEval fails for large files

2008-07-23 Thread Kanch
On Jul 23, 11:05 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Kanch wrote: > > Original file was 18MB, and contained 288328 element attributes for > > the particular path. > > You didn't say how many elements there are in total, but I wouldn't expect > that to be a problem, unless you have very l

Re: xpathEval fails for large files

2008-07-22 Thread Stefan Behnel
Kanch wrote: > Original file was 18MB, and contained 288328 element attributes for > the particular path. You didn't say how many elements there are in total, but I wouldn't expect that to be a problem, unless you have very little free memory (say, way below 256MB). I just tried with lxml 2.1 and

Re: xpathEval fails for large files

2008-07-22 Thread Kanch
On Jul 23, 2:03 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wrote: > > Kanchana wrote: > > >> 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.x

Re: xpathEval fails for large files

2008-07-22 Thread Stefan Behnel
Fredrik Lundh wrote: > Kanchana wrote: > >> 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

Re: xpathEval fails for large files

2008-07-22 Thread Jim Washington
Kanchana wrote: > 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

Re: xpathEval fails for large files

2008-07-22 Thread Paul Boddie
On 22 Jul, 11:00, Kanchana <[EMAIL PROTECTED]> wrote: > > 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.xpathFreeC

Re: xpathEval fails for large files

2008-07-22 Thread Fredrik Lundh
Kanchana wrote: 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

xpathEval fails for large files

2008-07-22 Thread Kanchana
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 hig