OS Manuals

/usr/bin/xmllint

libxml2-2.13 utils

From libxml2-2.13-utils 2.13.9-r2 (os), captured 2026-11-05 by running xmllint --help (exit 1). permalink

Also provided by 1 other package version
Unknown option --help
Usage : /usr/bin/xmllint [options] XMLfiles ...
	Parse the XML files and output the result of the parsing
	--version : display the version of the XML library used
	--debug : dump a debug tree of the in-memory document
	--shell : run a navigating shell
	--debugent : debug the entities defined in the document
	--copy : used to test the internal copy implementation
	--recover : output what was parsable on broken XML documents
	--huge : remove any internal arbitrary parser limits
	--noent : substitute entity references by their value
	--noenc : ignore any encoding specified inside the document
	--noout : don't output the result tree
	--path 'paths': provide a set of paths for resources
	--load-trace : print trace of all external entities loaded
	--nonet : refuse to fetch DTDs or entities over network
	--nocompact : do not generate compact text nodes
	--htmlout : output results as HTML
	--nowrap : do not put HTML doc wrapper
	--valid : validate the document in addition to std well-formed check
	--postvalid : do a posteriori validation, i.e after parsing
	--dtdvalid URL : do a posteriori validation against a given DTD
	--dtdvalidfpi FPI : same but name the DTD with a Public Identifier
	--insert : ad-hoc test for valid insertions
	--quiet : be quiet when succeeded
	--timing : print some timings
	--repeat : repeat 100 times, for timing or profiling
	--dropdtd : remove the DOCTYPE of the input docs
	--html : use the HTML parser
	--xmlout : force to use the XML serializer when using --html
	--nodefdtd : do not default HTML doctype
	--push : use the push mode of the parser
	--pushsmall : use the push mode of the parser using tiny increments
	--memory : parse from memory
	--maxmem nbbytes : limits memory allocation to nbbytes bytes
	--nowarning : do not emit warnings from parser/validator
	--noblanks : drop (ignorable?) blanks spaces
	--nocdata : replace cdata section with text nodes
	--output file or -o file: save to a given file
	--format : reformat/reindent the output
	--encode encoding : output in the given encoding
	--pretty STYLE : pretty-print in a particular style
	                 0 Do not pretty print
	                 1 Format the XML content, as --format
	                 2 Add whitespace inside tags, preserving content
	--compress : turn on gzip compression of output
	--c14n : save in W3C canonical format v1.0 (with comments)
	--c14n11 : save in W3C canonical format v1.1 (with comments)
	--exc-c14n : save in W3C exclusive canonical format (with comments)
	--nsclean : remove redundant namespace declarations
	--testIO : test user I/O support
	--catalogs : use SGML catalogs from $SGML_CATALOG_FILES
	             otherwise XML Catalogs starting from
	         file:///etc/xml/catalog are activated by default
	--nocatalogs: deactivate all catalogs
	--auto : generate a small doc on the fly
	--xinclude : do XInclude processing
	--noxincludenode : same but do not generate XInclude nodes
	--nofixup-base-uris : do not fixup xml:base uris
	--loaddtd : fetch external DTD
	--dtdattr : loaddtd + populate the tree with inherited attributes
	--stream : use the streaming interface to process very large files
	--walker : create a reader and walk though the resulting doc
	--pattern pattern_value : test the pattern support
	--relaxng schema : do RelaxNG validation against the schema
	--schema schema : do validation against the WXS schema
	--schematron schema : do validation against a schematron
	--sax1: use the old SAX1 interfaces for processing
	--sax: do not build a tree but work just at the SAX level
	--oldxml10: use XML-1.0 parsing rules before the 5th edition
	--xpath expr: evaluate the XPath expression, imply --noout
	--max-ampl value: set maximum amplification factor

Libxml project home page: https://gitlab.gnome.org/GNOME/libxml2
Options (54)
OptionDescriptionSource
--autoGenerate a small document for testing purposes.man
--catalogsUse the SGML catalog(s) from SGML_CATALOG_FILES.man
--compressTurn on gzip(1) compression of output.man
--copyTest the internal copy implementation.man
--c14nUse the W3C XML Canonicalisation (C14N) to serialize the result of parsing to stdout.man
--dtdvalid URLUse the DTD specified by an URL for validation.man
--dtdvalidfpi FPIUse the DTD specified by a Formal Public Identifier FPI for validation, note that this will require a catalog exporting that Formal Public Identifier to work.man
--debugParse a file and output an annotated tree of the in-memory version of the document.man
--debugentDebug the entities defined in the document.man
--dropdtdRemove DTD from output.man
--dtdattrFetch external DTD and populate the tree with inherited attributes.man
--encode ENCODINGOutput in the given encoding.man
--formatReformat and reindent the output.man
--helpPrint out a short usage summary for xmllint.man
--htmlUse the HTML parser.man
--htmloutOutput results as an HTML file.man
--insertTest for valid insertions.man
--loaddtdFetch an external DTD.man
--load-traceDisplay all the documents loaded during the processing to stderr.man
--max-ampl INTEGERSet the maximum amplification factor which protects against exponential entity expansion ("billion laughs").man
--maxmem NNBYTESTest the parser memory support.man
--memoryParse from memory.man
--noblanksDrop ignorable blank spaces.man
--nocatalogsDo not use any catalogs.man
--nocdataSubstitute CDATA section by equivalent text nodes.man
--nodictDon't use dictionaries (parser option XML_PARSE_NODICT).man
--noentSubstitute entity values for entity references.man
--nonetDo not use the Internet to fetch DTDs or entities.man
--nooutSuppress output.man
--nowarningDo not emit warnings from the parser and/or validator.man
--nowrapDo not output HTML doc wrapper.man
--noxincludenodeDo XInclude processing but do not generate XInclude start and end nodes.man
--nscleanRemove redundant namespace declarations.man
--output FILEDefine a file path where xmllint will save the result of parsing.man
--path "PATH(S)"Use the (space- or colon-separated) list of filesystem paths specified by PATHS to load DTDs or entities.man
--pattern PATTERNVALUEUsed to exercise the pattern recognition engine, which can be used with the reader interface to the parser.man
--pedanticEnable additional warnings.man
--postvalidValidate after parsing has completed.man
--pushUse the push mode of the parser.man
--quietDon't print informational messages to stderr.man
--recoverOutput any parsable portions of an invalid document.man
--relaxng SCHEMAUse RelaxNG file named SCHEMA for validation.man
--repeatRepeat 100 times, for timing or profiling.man
--schema SCHEMAUse a W3C XML Schema file named SCHEMA for validation.man
--shellRun a navigating shell.man
--xpath "XPath_expression"Run an XPath expression given as argument and print the result.man
--streamUse streaming API - useful when used in combination with --relaxng or --valid options for validation of files that are too large to be held in memory.man
--testIOTest user input/output support.man
--timingOutput information about the time it takes xmllint to perform the various steps.man
--validDetermine if the document is a valid instance of the included Document Type Definition (DTD).man
--versionDisplay the version of libxml(3) used.man
--walkerTest the walker module, which is a reader interface but for a document tree, instead of using the reader API on an unparsed document it works on an existing in-memory tree.man
--xincludeDo XInclude processing.man
--xmloutUsed in conjunction with --html.man
Exit status (11) from the manual page
0No error
1Unclassified
2Error in DTD
3Validation error
4Validation error
5Error in schema compilation
6Error writing output
7Error in pattern (generated when --pattern option is used)
9Out of memory error
10XPath evaluation error
11XPath result is empty

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.