{"repo":"sibprogrammer/xq","free":true,"listed":false,"github":"https://github.com/sibprogrammer/xq","clone":"git clone https://github.com/sibprogrammer/xq.git","description":"Command-line XML and HTML beautifier and content extractor","language":"Go","stars":1141,"topics":["terminal","xml","syntax-highlighting","xpath","html","formatter","cli","golang"],"license":"MIT","category":"cli-tools","readme_excerpt":"xq Command-line XML and HTML beautifier and content extractor. Features Syntax highlighting Automatic indentation and formatting Automatic pagination Node content extraction Usage Format an XML file and highlight the syntax: xq also accepts input through stdin : HTML content can be formatted and highlighted as well (using -m flag): Format multiple files at once: In place formatting is supported as well (using -i flag): It is possible to extract the content using XPath query language. -x parameter accepts XPath expression. Extract the text content of all nodes with city name: Extract the value of attribute named status and belonging to user : See https://en.wikipedia.org/wiki/XPath for details. It is possible to use CSS selector to extract the content as well: Extract an attribute value instead of node content additional option --attr ( -a ) can be used: Extract part of HTML with tags (not only text content) using CSS selector: Output the result as JSON: This will output the result in JSON format, preserving the XML structure. The JSON output will be an object where: - XML elements become object keys - Attributes are prefixed with \"@\" - Text content is stored under \"#text\" if the element has attributes or child elements - Repeated elements are automatically converted to arrays - Elements with only text content are represented as strings The output is piped to a pager if it is defined via the XQ PAGER or PAGER environment variable ( XQ PAGER takes precedence). The pager can be ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sibprogrammer","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sibprogrammer/xq/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}