Linux command
xml-pyx 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Convert an XML file to PYX format
xml pyx [file.xml]
Convert XML from stdin
cat [file.xml] | xml pyx
Strip all attributes from an XML file using PYX filtering
xml pyx [file.xml] | grep -v "^A" | xml depyx
说明
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.
FAQ
What is the xml-pyx command used for?
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.
How do I run a basic xml-pyx example?
Run `xml pyx [file.xml]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more xml-pyx examples?
This page includes 3 examples for xml-pyx, plus related commands for nearby Linux tasks.