xmq

Parse, 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 xml and make it readable$ xmq file.xml
convert json to xml format$ xmq file.json --output-format=xml
extract specific data from html file$ xmq file.html --select '//div[@class="content"]'
convert xml to json output$ xmq file.xml --output-format=json
query and filter xml elements by attribute$ xmq file.xml --select '/root/item[@id="123"]'