3 .\" Author: John Fleck <jfleck@inkstain.net>
4 .\" Generator: DocBook XSL Stylesheets v1.78.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
59 accepts the following options (in alphabetical order):
63 Generate a small document for testing purposes\&.
71 \fBSGML_CATALOG_FILES\fR\&. Otherwise
73 catalogs starting from
75 are used by default\&.
80 Turn on node registration\&. Useful for developers testing
89 compression of output\&.
94 Test the internal copy implementation\&.
101 Canonicalisation (C14N) to serialize the result of parsing to
102 stdout\&. It keeps comments in the result\&.
105 \fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
114 \fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
118 specified by a Formal Public Identifier
120 for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
125 Parse a file and output an annotated tree of the in\-memory version of the document\&.
130 Debug the entities defined in the document\&.
144 and populate the tree with inherited attributes\&.
147 \fB\-\-encode \fR\fB\fIENCODING\fR\fR
149 Output in the given encoding\&. Note that this works for full document not fragments or result from XPath queries\&.
154 Reformat and reindent the output\&. The
156 environment variable controls the indentation\&. The default value is two spaces " ")\&.
161 Print out a short usage summary for
178 to output the necessary
180 tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
185 Test for valid insertions\&.
194 \fB\-\-load\-trace\fR
196 Display all the documents loaded during the processing to
200 \fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
202 Test the parser memory support\&.
204 is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of
206 files will not exhaust the virtual memory of the server running them\&.
216 Drop ignorable blank spaces\&.
221 Do not use any catalogs\&.
226 Substitute CDATA section by equivalent text nodes\&.
231 Substitute entity values for entity references\&. By default,
233 leaves entity references in place\&.
238 Do not use the Internet to fetch
244 Suppress output\&. By default,
246 outputs the result tree\&.
251 Do not emit warnings from the parser and/or validator\&.
261 \fB\-\-noxincludenode\fR
263 Do XInclude processing but do not generate XInclude start and end nodes\&.
268 Remove redundant namespace declarations\&.
271 \fB\-\-output \fR\fB\fIFILE\fR\fR
273 Define a file path where
275 will save the result of parsing\&. Usually the programs build a tree and save it on
276 stdout, with this option the result
278 instance will be saved onto a file\&.
281 \fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
283 Use the (space\- or colon\-separated) list of filesystem paths specified by
286 DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
289 \fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
291 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\&.
296 Validate after parsing has completed\&.
301 Use the push mode of the parser\&.
306 Output any parsable portions of an invalid document\&.
309 \fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
311 Use RelaxNG file named
318 Repeat 100 times, for timing or profiling\&.
321 \fB\-\-schema \fR\fB\fISCHEMA\fR\fR
332 Run a navigating shell\&. Details on available commands in shell mode are below (see
333 the section called \(lqSHELL COMMANDS\(rq)\&.
336 \fB\-\-xpath "\fR\fB\fIXPath_expression\fR\fR\fB"\fR
338 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\&.
345 \- useful when used in combination with
349 options for validation of files that are too large to be held in memory\&.
354 Test user input/output support\&.
359 Output information about the time it takes
361 to perform the various steps\&.
366 Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A
368 to be validated against also can be specified at the command line using the
370 option\&. By default,
372 also checks to determine if the document is well\-formed\&.
377 Display the version of
384 Test the walker module, which is a reader interface but for a document tree, instead of using the reader
386 on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
391 Do XInclude processing\&.
396 Used in conjunction with
397 \fB\-\-html\fR\&. Usually when
399 is parsed the document is saved with the
401 serializer\&. But with this option the resulting document is saved with the
403 serializer\&. This is primarily used to generate
412 offers an interactive shell mode invoked with the
414 command\&. Available commands in shell mode include (in alphabetical order):
428 \fBcat \fR\fB\fINODE\fR\fR
430 Display the given node or the current one\&.
433 \fBcd \fR\fB\fIPATH\fR\fR
435 Change the current node to the given path (if unique) or root if no argument is given\&.
438 \fBdir \fR\fB\fIPATH\fR\fR
440 Dumps information about the node (namespace, attributes, content)\&.
443 \fBdu \fR\fB\fIPATH\fR\fR
445 Show the structure of the subtree under the given path or the current node\&.
460 Display memory usage\&.
463 \fBload \fR\fB\fIFILENAME\fR\fR
465 Load a new document with the given filename\&.
468 \fBls \fR\fB\fIPATH\fR\fR
470 List contents of the given path or the current directory\&.
475 Display the path to the current node\&.
483 \fBsave \fR\fB\fIFILENAME\fR\fR
485 Save the current document to the given filename or to the original name\&.
490 Check the document for errors\&.
493 \fBwrite \fR\fB\fIFILENAME\fR\fR
495 Write the current node to the given filename\&.
499 \fBSGML_CATALOG_FILES\fR
502 catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
503 \fBSGML_CATALOG_FILES\fR
504 environment variable to a list of catalogs\&. An empty one should deactivate loading the default
509 \fBXML_CATALOG_FILES\fR
512 catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
513 \fBXML_CATALOG_FILES\fR
514 environment variable to a list of catalogs\&. An empty one should deactivate loading the default
519 \fBXML_DEBUG_CATALOG\fR
521 Setting the environment variable
522 \fBXML_DEBUG_CATALOG\fR
527 command outputs debugging information related to catalog operations\&.
532 Setting the environment variable
534 controls the indentation\&. The default value is two spaces " "\&.
539 return codes provide information that can be used when calling it from scripts\&.
569 Error in schema compilation
579 Error in pattern (generated when
586 Error in Reader registration (generated when
587 \fB\-\-chkregister\fR
599 More information can be found at
611 \m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
625 \m[blue]\fB\%http://www.w3.org/TR/xslt\fR\m[]
630 \fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
635 \fBZiying Sherwin\fR <\&sherwin@nlm\&.nih\&.gov\&>
640 \fBHeiko Rupp\fR <\&hwr@pilhuhn\&.de\&>
646 Copyright \(co 2001, 2004