xq Command-Line XML and HTML Beautifier and Content Extractor
xq is a command-line XML and HTML beautifier and content extractor written in Go. It provides syntax highlighting, automatic formatting, XPath and CSS selector queries, and JSON output conversion for XML and HTML documents.
What it does
xq Command-Line XML and HTML Beautifier and Content Extractor
xq is a command-line XML and HTML beautifier and content extractor written in Go. It provides syntax highlighting, automatic formatting, XPath and CSS selector queries, and JSON output conversion for XML and HTML documents.
Prerequisites
Go 1.21+ or Homebrew
Installation
Use the upstream install or setup path that matches your environment:
- brew install xq
- go install github.com/sibprogrammer/xq@latest
- docker compose run --rm xq
Requirements and caveats from upstream:
- Node content extraction
- Extract an attribute value instead of node content additional option --attr (-a) can be used:
- If you have Go toolchain installed, you can use the following command to install xq:
Basic usage or getting-started notes:
-
Format an XML file and highlight the syntax:
-
xq test/data/xml/unformatted.xml
-
xq also accepts input through stdin:
-
Extracted from upstream docs: https://raw.githubusercontent.com/sibprogrammer/xq/HEAD/README.md
Documentation
Source
Capabilities
Install
Quality
deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,261 chars)