Think about Loose Coupling | |
PerlMonks |
Re: perl & XML: getting last child?by sundialsvc4 (Abbot) |
on Apr 18, 2013 at 00:52 UTC ( [id://1029239]=note: print w/replies, xml ) | Need Help?? |
Indeed. When you are doing any sort of real-world work with an XML file, “get to know XPath expressions .. very well.” Don’t write procedural (Perl...) code, whose procedural structure will necessarily be tied more-or-less to that of the structure you’re parsing. Instead, write an XPath expression to push, as much as possible, the entire responsibility into the library’s hands. Just as you do every day with an SQL query ...
In Section
Seekers of Perl Wisdom
|
|