4 ms·
What are the de facto tools for formatting and querying XML files through a CLI? They should be ridiculously simple to install and use.
by crehn 7y ago
What are the de facto tools for formatting and querying XML files through a CLI? They should be ridiculously simple to install and use.
- SamWhited 7y agoIf 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.
- 0x0 7y agoxmlstarlet is a useful CLI XML manipulation tool