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 Mike Trotman other posts by this author
Oct 19 2009 10:41AM messages near this date
view in the new Beta List Site
Re: XML::XPath to read multiple files | LibXSLT crashes
& XSLT This is a suggestion of an alternative approach - not an example.
If you are processing MANY XMLdocuments then an alternative solution could
be to use the Sleepycat Berkley XML database.
Load your documents (or part of them) into this.
Then do your Xpath queries (or even XQuery's) across all documents in a
single operation.

This obviously has higher overheads for some parts of the process - so needs
careful consideration.

If you are doing multiple queries across all your documents then I suspect
this will prove an efficient approach.



2009/10/19 Robert Inder <robert@[...].uk> 

>  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 realise that this is not a good way to do things, since the README
>  for XML::XPath says...
> 
>     It is very much recommended that you use only 1 XPath object
>     throughout the life of your application.
> 
>  But it is not obvious what I should do instead!
> 
>  Yet this must surely be a common thing to do.   Musn't it?
> 
>  So can someone give me (or point me to) an example of how
>  process a number of files with only a single XPath object?
> 
>  Thanks...
> 
>  Robert.
>  _______________________________________________
>  Perl-XML mailing list
>  Perl-XML@[...].com
>  To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 


I am top posting because I don't want to have to scroll all the way down to
the bottom of a message to see the relevance of the reply.

Outgoing messages checked for viruses by Google Apps Postini Message Security
Thread:
Robert Inder
Mirod
Tod Harter
Mike Trotman

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