Archive

Posts Tagged ‘xpath’

Parsing XML and HTML using Perl and LibXML

May 31st, 2013 No comments

I used to parse HTML data using regular expressions and XML documents using xml parsers which normally parsed documents into arrays and hashes (key-value pairs).

But this time, I needed to retrieve only specific nodes of an XML document with some specific attribute. To do this, I could retrieve all nodes and then go through all records and use some conditions to get only those I am interested in or use some clever, modern solution. And this is where libXML stepped in.

Read more…

Categories: Programming Tags: , , ,
deadly laser