Forrest logo
tool overview
On this page you find all important commands for the CLI tool xml. If the command you are looking for is missing please ask our AI.

xml

The XML command line tool is a versatile utility for working with XML documents in a command line environment. It allows you to perform various XML-related tasks such as parsing, validating, transforming, querying, and manipulating XML files. With this tool, you can parse an XML document and retrieve specific elements or attributes using XPath or XQuery expressions. You can also validate an XML file against a specified XML Schema Definition (XSD) to ensure it conforms to the expected structure and data constraints. In addition, this command line tool supports the transformation of XML documents using XSLT stylesheets, allowing you to convert XML files into different formats or modify their contents. It also provides functionality for merging multiple XML files into a single document, splitting a large XML file into smaller chunks, and comparing XML files for differences. The tool supports various output formats including plain text, HTML, PDF, and even JSON for easy integration with other tools or systems. It offers extensive customization options through command line parameters, allowing you to control various aspects of the XML processing such as specifying input/output files, selecting specific elements, enabling verbose output, and more. The XML command line tool is available for multiple operating systems including Windows, macOS, and Linux, making it accessible to a wide range of users. Overall, this tool is a powerful companion for working with XML files in a command line environment, providing a comprehensive set of features to handle various XML-related tasks efficiently.

List of commands for xml:

  • xml-canonic:tldr:5e75c xml-canonic: Make an XML document canonical, removing comments.
    $ xml canonic --without-comments ${select} > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-canonic:tldr:6cd1c xml-canonic: Make an XML document canonical, preserving comments.
    $ xml canonic ${select} > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-canonic:tldr:aa874 xml-canonic: Display help for the `canonic` subcommand.
    $ xml canonic --help
    try on your machine
    explain this command
  • xml-canonic:tldr:fb084 xml-canonic: Make XML exclusively canonical, using an XPATH from a file, preserving comments.
    $ xml canonic --exc-with-comments ${select} ${path-to-c14n-xpath}
    try on your machine
    explain this command
  • xml-depyx:tldr:61bec xml-depyx: ISO 8879) document to XML format.
    $ xml depyx ${select} > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-depyx:tldr:ed0d3 xml-depyx: Display help for the `depyx` subcommand.
    $ xml depyx --help
    try on your machine
    explain this command
  • xml-edit:tldr:1c281 xml-edit: Delete elements matching an XPATH from an XML document.
    $ xml edit --delete "${XPATH1}" ${select}
    try on your machine
    explain this command
  • xml-edit:tldr:537ae xml-edit: Rename all attributes named "id" to "ID".
    $ xml edit --rename "${--*-@id}" -v "${ID}" ${select}
    try on your machine
    explain this command
  • xml-edit:tldr:6ce77 xml-edit: Update the XML table record with "id=3" to the value "id=5".
    $ xml edit --update "${xml-table-rec[@id=3]-@id}" -v ${5} ${select}
    try on your machine
    explain this command
  • xml-edit:tldr:ce9c7 xml-edit: Move an element node of an XML document from XPATH1 to XPATH2.
    $ xml edit --move "${XPATH1}" "${XPATH2}" ${select}
    try on your machine
    explain this command
  • xml-edit:tldr:efbb6 xml-edit: Display help for the `edit` subcommand.
    $ xml edit --help
    try on your machine
    explain this command
  • xml-elements:tldr:48d1e xml-elements: Print sorted unique elements from an XML document up to a depth of 3.
    $ xml elements -d${3} ${select}
    try on your machine
    explain this command
  • xml-elements:tldr:49b86 xml-elements: Extract elements from an XML document (producing XPATH expressions).
    $ xml elements ${select} > ${path-to-elements-xpath}
    try on your machine
    explain this command
  • xml-elements:tldr:82092 xml-elements: Print sorted unique elements from an XML document to see its structure.
    $ xml elements -u ${select}
    try on your machine
    explain this command
  • xml-elements:tldr:9c395 xml-elements: Extract elements and their attributes from an XML document.
    $ xml elements -a ${select} > ${path-to-elements-xpath}
    try on your machine
    explain this command
  • xml-elements:tldr:cf666 xml-elements: Display help for the `elements` subcommand.
    $ xml elements --help
    try on your machine
    explain this command
  • xml-elements:tldr:d785b xml-elements: Extract elements and their attributes and values from an XML document.
    $ xml elements -v ${select} > ${path-to-elements-xpath}
    try on your machine
    explain this command
  • xml-escape:tldr:2d94b xml-escape: Escape special XML characters in a string.
    $ xml escape "${}"
    try on your machine
    explain this command
  • xml-escape:tldr:52705 xml-escape: Display help for the `escape` subcommand.
    $ xml escape --help
    try on your machine
    explain this command
  • xml-format:tldr:0eb28 xml-format: Format an XML document, indenting with tabs.
    $ xml format --indent-tab ${select} > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-format:tldr:45ef2 xml-format: Recover parsable parts of a malformed XML document, without indenting.
    $ xml format --recover --noindent ${select} > ${path-to-recovered-xml}
    try on your machine
    explain this command
  • xml-format:tldr:7faa8 xml-format: Display help for the `format` subcommand.
    $ xml format --help
    try on your machine
    explain this command
  • xml-format:tldr:a6807 xml-format: Format an HTML document, indenting with 4 spaces.
    $ xml format --html --indent-spaces ${4} ${select} > ${path-to-output-html}
    try on your machine
    explain this command
  • xml-format:tldr:fd10e xml-format: Format an XML document, omitting the XML declaration.
    $ xml format --omit-decl ${select} > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-list:tldr:08518 xml-list: Write the specified directory's listing to an XML document.
    $ xml list ${path-to-directory} > ${path-to-dir_list-xml}
    try on your machine
    explain this command
  • xml-list:tldr:502c0 xml-list: Write the current directory's listing to an XML document.
    $ xml list > ${path-to-dir_list-xml}
    try on your machine
    explain this command
  • xml-list:tldr:63291 xml-list: Display help for the `list` subcommand.
    $ xml list --help
    try on your machine
    explain this command
  • xml-pyx:tldr:d1a9a xml-pyx: Convert an XML document to PYX format.
    $ xml pyx ${select} > ${path-to-output-pyx}
    try on your machine
    explain this command
  • xml-pyx:tldr:da294 xml-pyx: Display help for the `pyx` subcommand.
    $ xml pyx --help
    try on your machine
    explain this command
  • xml-select:tldr:39b37 xml-select: Count all nodes in one or more XML documents.
    $ xml select --text --template --inp-name --output " " --value-of "count(node())" --nl ${select} ${select1}
    try on your machine
    explain this command
  • xml-select:tldr:746fd xml-select: Match "XPATH1" and print the value of "XPATH2" as text with new-lines.
    $ xml select --text --template --match "${XPATH1}" --value-of "${XPATH2}" --nl ${select}
    try on your machine
    explain this command
  • xml-select:tldr:a8d0c xml-select: Display help for the `select` subcommand.
    $ xml select --help
    try on your machine
    explain this command
  • xml-select:tldr:c8ca0 xml-select: Select all elements matching "XPATH1" and print the value of their sub-element "XPATH2".
    $ xml select --template --match "${XPATH1}" --value-of "${XPATH2}" ${select}
    try on your machine
    explain this command
  • xml-select:tldr:cb297 xml-select: Count the elements of "XPATH1".
    $ xml select --template --value-of "count(${XPATH1})" ${select}
    try on your machine
    explain this command
  • xml-transform:tldr:67b80 xml-transform: Display help for the `transform` subcommand.
    $ xml transform --help
    try on your machine
    explain this command
  • xml-transform:tldr:ada1c xml-transform: Transform an XML document using an XSL stylesheet, passing one XPATH parameter and one literal string parameter.
    $ xml transform ${path-to-stylesheet-xsl} -p "${Count='count(-xml-table-rec)'}" -s ${Text="Count="} ${select}
    try on your machine
    explain this command
  • xml-unescape:tldr:58897 xml-unescape: Unescape special XML characters from a string.
    $ xml unescape "${<a1>}"
    try on your machine
    explain this command
  • xml-validate:tldr:10933 xml-validate: Display help for the `validate` subcommand.
    $ xml validate --help
    try on your machine
    explain this command
  • xml-validate:tldr:4e4b3 xml-validate: Validate one or more XML documents against a Document Type Definition (DTD).
    $ xml validate --dtd ${path-to-schema-dtd} ${select} ${input2-xml ---}
    try on your machine
    explain this command
  • xml-validate:tldr:906be xml-validate: Validate one or more XML documents against an XML Schema Definition (XSD).
    $ xml validate --xsd ${path-to-schema-xsd} ${select} ${input2-xml ---}
    try on your machine
    explain this command
  • xml-validate:tldr:a7626 xml-validate: Validate one or more XML documents for well-formedness only.
    $ xml validate ${select} ${input2-xml ---}
    try on your machine
    explain this command
  • xml-validate:tldr:e4cf7 xml-validate: Validate one or more XML documents against a Relax NG schema (RNG).
    $ xml validate --relaxng ${path-to-schema-rng} ${select} ${input2-xml ---}
    try on your machine
    explain this command
  • xml:tldr:34401 xml: Display general help, including the list of subcommands.
    $ xml --help
    try on your machine
    explain this command
  • xml:tldr:56791 xml: Execute a subcommand using `stdin` and `stdout`.
    $ xml ${subcommand} ${options}
    try on your machine
    explain this command
  • xml:tldr:5f5e3 xml: Execute a subcommand with input from a file or URI, printing to `stdout`.
    $ xml ${subcommand} ${options} ${select}
    try on your machine
    explain this command
  • xml:tldr:b45f4 xml: Execute a subcommand with input from a file or URI and output to a file.
    $ xml ${subcommand} ${options} ${select} > ${path-to-output}
    try on your machine
    explain this command
  • xml:tldr:dc945 xml: Display the version of the XMLStarlet Toolkit.
    $ xml --version
    try on your machine
    explain this command
  • xml:tldr:dd6bf xml: Display help for a subcommand.
    $ xml ${subcommand} --help
    try on your machine
    explain this command
tool overview