LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xmlto

Convert XML to various output formats

TLDR

Convert to HTML
$ xmlto html [document.xml]
copy
Convert to PDF
$ xmlto pdf [document.xml]
copy
Convert to man page
$ xmlto man [document.xml]
copy
Output directory
$ xmlto -o [output/] html [document.xml]
copy
With stylesheet
$ xmlto -x [custom.xsl] html [document.xml]
copy

SYNOPSIS

xmlto [-o dir] [-x stylesheet] [options] format file

DESCRIPTION

xmlto is a frontend tool for converting XML documents to various output formats using XSL stylesheets. It supports generating HTML, PDF, man pages, plain text, and other formats from XML source files, with particular strength in processing DocBook documentation.The tool acts as a wrapper around XSLT processors and formatting backends, handling the details of stylesheet selection and tool invocation. Custom stylesheets can be provided with the -x option to override the default conversion behavior and tailor the output to specific requirements.xmlto is commonly used in software documentation workflows where source documentation is maintained in DocBook XML format and needs to be published in multiple output formats for different audiences.

PARAMETERS

-o DIR

Output directory.
-x XSL
Custom stylesheet.
-v
Verbose.
--skip-validation
Skip DTD validation.
format
Output format.

CAVEATS

Requires DocBook XSL stylesheets and an XSLT processor (xsltproc) to be installed. PDF output additionally requires a formatting backend like FOP or dblatex. Primarily designed for DocBook XML; other XML vocabularies need custom stylesheets.

HISTORY

xmlto was created for converting XML documents, particularly DocBook, to various output formats.

SEE ALSO

Copied to clipboard
Kai