xmq

Query and transform XML, HTML, and JSON from the command line

brewmacoslinux
Try with needOr install directly
Source

About

Tool and language to work with xml/html/json

Commands

xmq

Examples

Pretty print an XML file$ xmq input.xml
Query XML with XPath-like syntax$ xmq input.xml -q 'root/element'
Convert XML to JSON format$ xmq input.xml --output json