xq linux code example
Example 1: jq for xml
Install xq command for parsing xml files outputs:
pip install xq
Example 2: jq yq for html
Install pup command for structuring in html format outputs into lines:
brew install pup
Then you can use pup command to split, parse or wrap html outputs:
cat file.html | pup #html is parsed into an optimally visible format
cat file.html | pup 'span#See_also' #filters span tags with See_also id