Command-line tool pretty-print XML with xpath
Command-line tool to validate and pretty-print XML.
# Install through pip pip install ppxml # Install through git pip install git+https://github.com/h2rd/ppxml # or without cache cd /tmp git clone https://github.com/h2rd/ppxml cd ppxml python setup.py install
Just prettify and colorize xml code:
curl http://feeds.bbci.co.uk/news/rss.xml | ppxml
Use xpath for get some elements:
curl http://feeds.bbci.co.uk/news/rss.xml | ppxml -x "//item"
Use xpath for get deeper elements:
curl http://feeds.bbci.co.uk/news/rss.xml | ppxml -x "//item/title"
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.