in reply to (Solved) : XML::Rules using parent/child to parse through XML

Prefacing my comments here with the statement that I have not read your posting too closely ... I would, categorically, say that “the appropriate way,” IMHO, for dealing with any “XML file,” is ... XML::Twig.   And, “the right way to get data out of an XML file” is... “XPath expressions.”

My simple reason for saying this is that I know, from the beginning, that this particular approach will consistently work.   No matter how ugly the file is.   No matter how big it is.   If you feel like you’re going to have to start writing a programming structure to match the data structure, filled with nested-loops and hashrefs and what-not, slap your fingers and tell them to “back away from that keyboard, slowly.”   Use searches, and let XPath do all of the searching for you.

Kindly don’t take these opinions to be as “dogmatic” as perhaps they initially sound.   I am merely saying:   It Just Works™, and I Like That™ ...   A Lot.™

Replies are listed 'Best First'.
Re^2: (Solved) : XML::Rules using parent/child to parse through XML
by runrig (Abbot) on Aug 26, 2011 at 01:23 UTC
    I disagree. XML::Rules also 'just works', often more elegantly than the twig. And sometimes I go straight to XML::LibXML for pure picking out things with XPath (if the file is "not too large") especially if the XPath is complex.