Created
June 22, 2014 14:52
-
-
Save douglascodes/1caaacd55a7edc66cd57 to your computer and use it in GitHub Desktop.
Download, parse and strip tags from two XML attributes in single Linux command line. Great for testing RSS feeds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -q -O- {http://www.example.com/foo.xml} | xpath -q -e '{path/to/xml_element/attr1} | {path/to/xml_element/attr2}' | sed -re 's/(<\w+?>|<\/\w+?>)//g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment