Re: XML::XPath to read multiple files

Mike Trotman <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
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 <[email protected]>

> 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
> [email protected]
> 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

_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.