xq

Command-line XML and HTML beautifier and content extractor

brewmacoslinux
Try with needOr install directly
Source

About

Command-line XML and HTML beautifier and content extractor

Commands

xq

Examples

Pretty-print an XML file with indentation$ xq '.' input.xml
Extract specific XML element content$ xq '.root.child.text()' document.xml
Convert XML to JSON format$ xq -o json '.' file.xml