https://github.com/alpine-docker/xml
several xml tools to work on xml file as jq to json
https://github.com/alpine-docker/xml
Last synced: 27 days ago
JSON representation
several xml tools to work on xml file as jq to json
- Host: GitHub
- URL: https://github.com/alpine-docker/xml
- Owner: alpine-docker
- License: mit
- Created: 2020-02-21T01:25:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-16T03:14:52.000Z (almost 5 years ago)
- Last Synced: 2025-03-20T16:38:00.979Z (about 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xml parser
This repo has been archived, its image will be maintained in repo https://github.com/alpine-docker/multi-arch-docker-images/tree/master/xml
### Github Repo
https://github.com/alpine-docker/xml
### Daily Travis CI build logs
https://travis-ci.org/alpine-docker/xml
### Docker image tags
https://hub.docker.com/r/alpine/xml/tags/
### installed tools
- xmllint - command line XML tool (http://xmlsoft.org/xmllint.html)
- jq - jq is like sed for JSON data (https://stedolan.github.io/jq/)
- xq - Command-line XML processor (https://github.com/kislyuk/yq)
If you need other xml tools, let me know.
### Command samples
get `version`
docker run -ti --rm alpine/xml sh -c "curl -s https://raw.githubusercontent.com/codecov/example-java/master/pom.xml |xq .project.version"
exclude `version`
docker run -ti --rm alpine/xml sh -c "curl https://raw.githubusercontent.com/codecov/example-java/master/pom.xml |xq 'del(.project.version)' --xml-output"
convert a local xml to json
docker run -ti --rm -v $(pwd):/apps -w /apps alpine/xml sh -c "xq .< pom.xml"
For usage of `xmllint`, please go through its [homepage](http://xmlsoft.org/xmllint.html)