Hacker News new | past | comments | ask | show | jobs | submit login

What are the de facto tools for formatting and querying XML files through a CLI? They should be ridiculously simple to install and use.



If you have libxml2-utils installed (package name may vary depending on your distro, but it almost certainly has a package) you can probably do something like "xmllint --format". You can also use "xmllint --shell file.xml" to get an interactive shell, or execute an xpath query and return, eg. "xmllint --xpath //foo file.xml". Use "-" for the file to read from stdin, as you might expect.


xmlstarlet is a useful CLI XML manipulation tool




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: