3 .\" Author: John Fleck <jfleck@inkstain.net>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: xmllint Manual
10 .TH "XMLLINT" "1" "$Date$" "libxml2" "xmllint Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 xmllint \- command line XML tool
33 .HP \w'\fBxmllint\fR\ 'u
34 \fBxmllint\fR [\fB\-\-version\fR | \fB\-\-debug\fR | \fB\-\-shell\fR | \fB\-\-xpath\ "\fR\fB\fIXPath_expression\fR\fR\fB"\fR | \fB\-\-debugent\fR | \fB\-\-copy\fR | \fB\-\-recover\fR | \fB\-\-noent\fR | \fB\-\-noout\fR | \fB\-\-nonet\fR | \fB\-\-path\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR | \fB\-\-load\-trace\fR | \fB\-\-htmlout\fR | \fB\-\-nowrap\fR | \fB\-\-valid\fR | \fB\-\-postvalid\fR | \fB\-\-dtdvalid\ \fR\fB\fIURL\fR\fR | \fB\-\-dtdvalidfpi\ \fR\fB\fIFPI\fR\fR | \fB\-\-timing\fR | \fB\-\-output\ \fR\fB\fIFILE\fR\fR | \fB\-\-repeat\fR | \fB\-\-insert\fR | \fB\-\-compress\fR | \fB\-\-html\fR | \fB\-\-xmlout\fR | \fB\-\-push\fR | \fB\-\-memory\fR | \fB\-\-maxmem\ \fR\fB\fINBBYTES\fR\fR | \fB\-\-nowarning\fR | \fB\-\-noblanks\fR | \fB\-\-nocdata\fR | \fB\-\-format\fR | \fB\-\-encode\ \fR\fB\fIENCODING\fR\fR | \fB\-\-dropdtd\fR | \fB\-\-nsclean\fR | \fB\-\-testIO\fR | \fB\-\-catalogs\fR | \fB\-\-nocatalogs\fR | \fB\-\-auto\fR | \fB\-\-xinclude\fR | \fB\-\-noxincludenode\fR | \fB\-\-loaddtd\fR | \fB\-\-dtdattr\fR | \fB\-\-stream\fR | \fB\-\-walker\fR | \fB\-\-pattern\ \fR\fB\fIPATTERNVALUE\fR\fR | \fB\-\-chkregister\fR | \fB\-\-relaxng\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-schema\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-c14n\fR] {\fIXML\-FILE(S)\fR... | \-}
35 .HP \w'\fBxmllint\fR\ 'u
36 \fBxmllint\fR \fB\-\-help\fR
41 program parses one or more
43 files, specified on the command line as
45 (or the standard input if the filename provided is
47 )\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in
60 accepts the following options (in alphabetical order):
64 Generate a small document for testing purposes\&.
72 \fBSGML_CATALOG_FILES\fR\&. Otherwise
74 catalogs starting from
76 are used by default\&.
81 Turn on node registration\&. Useful for developers testing
90 compression of output\&.
95 Test the internal copy implementation\&.
102 Canonicalisation (C14N) to serialize the result of parsing to
103 stdout\&. It keeps comments in the result\&.
106 \fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
115 \fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
119 specified by a Formal Public Identifier
121 for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
126 Parse a file and output an annotated tree of the in\-memory version of the document\&.
131 Debug the entities defined in the document\&.
145 and populate the tree with inherited attributes\&.
148 \fB\-\-encode \fR\fB\fIENCODING\fR\fR
150 Output in the given encoding\&.
155 Reformat and reindent the output\&. The
157 environment variable controls the indentation\&. The default value is two spaces " ")\&.
162 Print out a short usage summary for
179 to output the necessary
181 tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
186 Test for valid insertions\&.
195 \fB\-\-load\-trace\fR
197 Display all the documents loaded during the processing to
201 \fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
203 Test the parser memory support\&.
205 is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of
207 files will not exhaust the virtual memory of the server running them\&.
217 Drop ignorable blank spaces\&.
222 Do not use any catalogs\&.
227 Substitute CDATA section by equivalent text nodes\&.
232 Substitute entity values for entity references\&. By default,
234 leaves entity references in place\&.
239 Do not use the Internet to fetch
245 Suppress output\&. By default,
247 outputs the result tree\&.
252 Do not emit warnings from the parser and/or validator\&.
262 \fB\-\-noxincludenode\fR
264 Do XInclude processing but do not generate XInclude start and end nodes\&.
269 Remove redundant namespace declarations\&.
272 \fB\-\-output \fR\fB\fIFILE\fR\fR
274 Define a file path where
276 will save the result of parsing\&. Usually the programs build a tree and save it on
277 stdout, with this option the result
279 instance will be saved onto a file\&.
282 \fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
284 Use the (space\- or colon\-separated) list of filesystem paths specified by
287 DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
290 \fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
292 Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser\&. It allows to select some nodes in the document based on an XPath (subset) expression\&. Used for debugging\&.
297 Validate after parsing has completed\&.
302 Use the push mode of the parser\&.
307 Output any parsable portions of an invalid document\&.
310 \fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
312 Use RelaxNG file named
319 Repeat 100 times, for timing or profiling\&.
322 \fB\-\-schema \fR\fB\fISCHEMA\fR\fR
333 Run a navigating shell\&. Details on available commands in shell mode are below (see
334 the section called \(lqSHELL COMMANDS\(rq)\&.
337 \fB\-\-xpath "\fR\fB\fIXPath_expression\fR\fR\fB"\fR
339 Run an XPath expression given as argument and print the result\&. In case of a nodeset result, each node in the node set is serialized in full in the output\&. In case of an empty node set the "XPath set is empty" result will be shown and an error exit code will be returned\&.
346 \- useful when used in combination with
350 options for validation of files that are too large to be held in memory\&.
355 Test user input/output support\&.
360 Output information about the time it takes
362 to perform the various steps\&.
367 Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A
369 to be validated against also can be specified at the command line using the
371 option\&. By default,
373 also checks to determine if the document is well\-formed\&.
378 Display the version of
385 Test the walker module, which is a reader interface but for a document tree, instead of using the reader
387 on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
392 Do XInclude processing\&.
397 Used in conjunction with
398 \fB\-\-html\fR\&. Usually when
400 is parsed the document is saved with the
402 serializer\&. But with this option the resulting document is saved with the
404 serializer\&. This is primarily used to generate
414 offers an interactive shell mode invoked with the
416 command\&. Available commands in shell mode include (in alphabetical order):
430 \fBcat \fR\fB\fINODE\fR\fR
432 Display the given node or the current one\&.
435 \fBcd \fR\fB\fIPATH\fR\fR
437 Change the current node to the given path (if unique) or root if no argument is given\&.
440 \fBdir \fR\fB\fIPATH\fR\fR
442 Dumps information about the node (namespace, attributes, content)\&.
445 \fBdu \fR\fB\fIPATH\fR\fR
447 Show the structure of the subtree under the given path or the current node\&.
462 Display memory usage\&.
465 \fBload \fR\fB\fIFILENAME\fR\fR
467 Load a new document with the given filename\&.
470 \fBls \fR\fB\fIPATH\fR\fR
472 List contents of the given path or the current directory\&.
477 Display the path to the current node\&.
485 \fBsave \fR\fB\fIFILENAME\fR\fR
487 Save the current document to the given filename or to the original name\&.
492 Check the document for errors\&.
495 \fBwrite \fR\fB\fIFILENAME\fR\fR
497 Write the current node to the given filename\&.
501 \fBSGML_CATALOG_FILES\fR
504 catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
505 \fBSGML_CATALOG_FILES\fR
506 environment variable to a list of catalogs\&. An empty one should deactivate loading the default
511 \fBXML_CATALOG_FILES\fR
514 catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
515 \fBXML_CATALOG_FILES\fR
516 environment variable to a list of catalogs\&. An empty one should deactivate loading the default
521 \fBXML_DEBUG_CATALOG\fR
523 Setting the environment variable
524 \fBXML_DEBUG_CATALOG\fR
529 command outputs debugging information related to catalog operations\&.
534 Setting the environment variable
536 controls the indentation\&. The default value is two spaces " "\&.
542 return codes provide information that can be used when calling it from scripts\&.
572 Error in schema compilation
582 Error in pattern (generated when
589 Error in Reader registration (generated when
590 \fB\-\-chkregister\fR
602 More information can be found at
614 \m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
628 \m[blue]\fB\%http://www.w3.org/TR/xslt\fR\m[]
633 \fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
638 \fBZiying Sherwin\fR <\&sherwin@nlm\&.nih\&.gov\&>
643 \fBHeiko Rupp\fR <\&hwr@pilhuhn\&.de\&>
649 Copyright \(co 2001, 2004