Welcome to the Monastery | |
PerlMonks |
Re^2: Extracting elements from an XML chunk leads to crashby Hue-Bond (Priest) |
on Oct 24, 2007 at 08:36 UTC ( [id://646852]=note: print w/replies, xml ) | Need Help?? |
Don't you need a call to XML::LibXML::XPathContext->new there somewhere, passing the fragment node created by parse_balanced_chunk? Honestly I don't know, since I'm beginning with all this XML::LibXML stuff. Just add your new items, and leave the old ones there too, for as long as you want. [...] "a certain RSS reader has a certain lookup rate and I need to match that" Of course I wasn't going to match Google Reader's polling time, but take the opportunity to implement an expiry time of a couple of weeks or so. I just discovered I can use a DOM-like interface, and quickly went on this road. However I found another segfault condition. I'm going to notify the module's author but first I would like to share the offending code with you monks, so I don't send them a suboptimal snippet. This is it:
In particular I'm concerned about those (findnodes)[0]. I tried a couple of other approaches but didn't find anything that returned only the first element. The XSLT transformation does nothing interesting but is actually needed to crash the program. --
In Section
Seekers of Perl Wisdom
|
|