Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: confirming key in xml?

by sundialsvc4 (Abbot)
on Apr 06, 2015 at 23:26 UTC ( [id://1122631]=note: print w/replies, xml ) Need Help??


in reply to confirming key in xml?

After spending too-long telling myself that “XPath expressions can’t be ‘the right way’ to query an XML structure,” I have done a complete about-face.   XPath is declarative way to ask for what you need to find, and it works.   So, avoid writing code that is dependent upon the structure of the XML document, for the same reasons that you should avoid (hand-)writing recursive-descent parsers.   (No, no, no hard-and-fast rules here, but the time you save will be your own.)

In the process, I have also settled on XML::LibXML.   This module is an interface to libxml2, which is the de facto binary library for managing “XML everything.”   One of the main reasons why I like to use it, now, is that there’s a very good chance that I am using the same library, to do my part of the job, that my erstwhile data-exchange partner used, or will use, to do his.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-23 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found