in reply to Dynamically breaking up a data set
I strongly suggest that you use an XML-processing CPAN package such as, say, XML::LibXML, and that you “query” the file using an XPath expression. If you select and use a module that is designed to work with large XML files, will provide you with the means of obtaining and iterating through a list of nodes that are extracted from the file, no matter how big the file may be. By using XPath expressions, you specify what you are interested in and do not have to write one-off Perl logic to navigate through the structure.
You might also be able to get even further along with your task by using so-called XSLT stylesheets (which are not at all like CSS stylesheets). Very sophisticated XML transformations and queries can be specified using no programming per se at all. You might even find that you can do the entire task this way, using command-line tools and actually eliminating Perl altogether.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dynamically breaking up a data set
by Jenda (Abbot) on May 24, 2012 at 08:17 UTC |