Is there a jq, but for xml? And yes, I know about xslt, but looking for something more simple.
Conversation
A web search did turn up xml-to-json and vice versa, but would like something more native.
1
1
Replying to
XPath and XSLT are the native approach. If you use Python for scripting, lxml has an implementation of both:
lxml.de/xpathxslt.html
It can also translate CSS selectors to XPath expressions and supports those for XML rather than only HTML:
lxml.de/cssselect.html
2
1
Replying to
Yeah, familiar with both xpath and xslt. Was hoping for something as simple as jq. Something like jq, but uses xpath notation. The pipeline of jq makes it really useful for scripting.
1
Replying to
xmlstarlet exists as a CLI tool but it's not as nice as jq and hasn't been actively developed for a decade.

