LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xml-pyx

Convert XML to PYX line-oriented format

TLDR

Convert an XML file to PYX format
$ xml pyx [file.xml]
copy
Convert XML from stdin
$ cat [file.xml] | xml pyx
copy
Strip all attributes from an XML file using PYX filtering
$ xml pyx [file.xml] | grep -v "^A" | xml depyx
copy

SYNOPSIS

xml pyx [xml-file]

DESCRIPTION

xml pyx converts XML documents to PYX notation, a line-oriented representation derived from the SGML ESIS format (ISO 8879). It is part of the XMLStarlet toolkit (also invoked as `xmlstarlet pyx`).PYX represents each XML construct on a single line using prefix notation: `(` for opening tags, `)` for closing tags, `A` for attributes, `-` for text content, and `?` for processing instructions. This line-oriented format makes it easy to process XML with standard Unix text tools like grep, sed, and awk without requiring an XML parser.The companion command xml depyx (or xml p2x) converts PYX back into XML.

PARAMETERS

xml-file

Input XML file. If omitted, reads from stdin.

INSTALL

sudo dnf install xmlstarlet
copy
sudo pacman -S xmlstarlet
copy
sudo apk add xmlstarlet
copy
sudo zypper install xmlstarlet
copy
brew install xmlstarlet
copy
nix profile install nixpkgs#xmlstarlet
copy

CAVEATS

PYX is a simplified representation and may not preserve all XML features such as comments or CDATA sections.

SEE ALSO

xml-depyx(1), xml-p2x(1), xmlstarlet(1), xml(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid