Python and XPath

I had done some XPath using XMLStarlet in a shell script, and I quite like it.

Feeling “safe enough” with XPath I managed to deal with the Python XPath pitfall(s), and I quite like my 1st respective XPath Python script. And of course my Python script has a nicer CLI interface than my shell script.

My Python XPath pitfall briefly: You cannot (at least by my impression) start an XPath expression from the root — simply omit the root and you are fine.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.