ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: XML::XPath to read multiple files
by Tod Harter other posts by this author
Oct 21 2009 6:39AM messages near this date
view in the new Beta List Site
Re: XML::XPath to read multiple files | Re: XML::XPath to read multiple files
& XSLT Yeah, I have to agree. LibXML is a pretty fast library and is going to do
the job faster than alternative modules. The XPath statements that you use
may also be a factor. There are many ways to structure an XPath selector and
some may be MUCH more efficient than others. If switching to LibXML by
itself doesn't give you the speed increase you want then you may want to
consider exactly how you're doing things.

For example if a document has a bunch of data you want to extract which you
know is in a particular portion of the document its going to be a LOT faster
in general to select a node that is guaranteed to be the parent of the stuff
you want and is the closest point in the document tree you can get. This
might exclude a lot of searching of irrelevant data.

On Mon, Oct 19, 2009 at 2:02 PM, mirod <mirod@[...].com>  wrote:

>  Robert Inder wrote:
>  > I am trying to extend an application that uses XML::XPath to extract
>  > fragments of information from a small XML file.
>  >
>  > The extension will cause it to summarise this information from
>  > MANY XML files.  Doing the obvious thing gets me a working
>  > system, but it is slow.
>  >
>  > Currently, I am analysing each file in turn using the existing
>  information
>  > extraction code, and ths is creating an XML::XPath object to do the
>  business.
> 
>  I guess this bears repeating: ditch XML::XPath and use XML::LibXML, the
>  code
>  will be nearly identical, and you will live much happier.
> 
>  --
>  mirod
>  _______________________________________________
>  Perl-XML mailing list
>  Perl-XML@[...].com
>  To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 



-- 
The Wise adapts himself to the world. The Fool adapts the world to himself.
Therefore, all progress depends on the Fool.
Thread:
Robert Inder
Mirod
Tod Harter
Mike Trotman

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved