The XPath of Glory

2007-11-22 19:25:54

Should you ever need to work with XPath extensively, there's XPather for Firefox, that looks quite nice, but unfortunately I couldn't get it to work today, so I had to improvise. Then I stumpled across the very cool feature of xmllint, that lets you browse XML documents like directories.

$ cat test.xml

$ xmllint --shell test.xml
/ > cd //table[parent::div]/tr/td
td > ls
t--        1 d
td >

And to not be completely offtopic, I'll admit that once I got my XPath expressions, I fed them to SimpleXML


Life's a bitch, life's a whore. Nothing less, nothing more.

Read More