Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl XML Search

by sundialsvc4 (Abbot)
on Jan 11, 2013 at 22:18 UTC ( #1012990=note: print w/ replies, xml ) Need Help??


in reply to Perl XML Search

If we are to extrapolate this toy-example into a requirement of any size (and, mind you, you might not), then I will hands-down suggest that you use a library that supports XSLT XPath ... and that you use this technique to retrieve results from your XML structure, instead of cobblestoned logic of your own.   CPAN has a plentitude of industrial-strength XML tools, they’re quite efficient, and I feel that they consistently deliver more maintainable and flexible solutions.   Build an XPath expression that describes what you want, and let its fingers do the walking for you.


Comment on Re: Perl XML Search
Re^2: Perl XML Search
by Jenda (Abbot) on Jan 12, 2013 at 13:16 UTC

    If it is to perform when the amount of data and number of requests grow to non-toy proportions, XPath is not going to be a usable solution. A real solution will import the data into a database, create a few indexes and query the database instead.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012990]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-11-23 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (127 votes), past polls