1 .\" ** You probably do not want to edit this file directly **
2 .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
3 .\" Instead of manually editing it, you probably should edit the DocBook XML
4 .\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
5 .TH "XMLLINT" "1" "$Date$" "libxml2" ""
6 .\" disable hyphenation
8 .\" disable justification (adjust text to left margin only)
11 xmllint \- command line XML tool
14 \fBxmllint\fR [\fB\-\-version\fR \fB\-\-debug\fR \fB\-\-shell\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... \-}
16 \fBxmllint\fR \fB\-\-help\fR
21 program parses one or more
23 files, specified on the command line as
25 (or the standard input if the filename provided is
27 ). It prints various types of output, depending upon the options selected. It is useful for detecting errors both in
39 accepts the following options (in alphabetical order):
42 Generate a small document for testing purposes.
48 \fBSGML_CATALOG_FILES\fR. Otherwise
50 catalogs starting from
51 \fI/etc/xml/catalog\fR
55 Turn on node registration. Useful for developers testing
62 compression of output.
65 Test the internal copy implementation.
70 Canonicalisation (C14N) to serialize the result of parsing to
71 \fIstdout\fR. It keeps comments in the result.
73 \fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
80 \fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
83 specified by a Formal Public Identifier
85 for validation, note that this will require a catalog exporting that Formal Public Identifier to work.
88 Parse a file and output an annotated tree of the in\-memory version of the document.
91 Debug the entities defined in the document.
101 and populate the tree with inherited attributes.
103 \fB\-\-encode \fR\fB\fIENCODING\fR\fR
104 Output in the given encoding.
107 Reformat and reindent the output. The
109 environment variable controls the indentation. The default value is two spaces " ").
112 Print out a short usage summary for
125 to output the necessary
127 tags surrounding the result tree output so the results can be displayed/viewed in a browser.
130 Test for valid insertions.
136 \fB\-\-load\-trace\fR
137 Display all the documents loaded during the processing to
140 \fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
141 Test the parser memory support.
143 is the maximum number of bytes the library is allowed to allocate. This can also be used to make sure batch processing of
145 files will not exhaust the virtual memory of the server running them.
151 Drop ignorable blank spaces.
154 Do not use any catalogs.
157 Substitute CDATA section by equivalent text nodes.
160 Substitute entity values for entity references. By default,
162 leaves entity references in place.
165 Do not use the Internet to fetch
169 Suppress output. By default,
171 outputs the result tree.
174 Do not emit warnings from the parser and/or validator.
181 \fB\-\-noxincludenode\fR
182 Do XInclude processing but do not generate XInclude start and end nodes.
185 Remove redundant namespace declarations.
187 \fB\-\-output \fR\fB\fIFILE\fR\fR
188 Define a file path where
190 will save the result of parsing. Usually the programs build a tree and save it on
191 \fIstdout\fR, with this option the result
193 instance will be saved onto a file.
195 \fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
196 Use the (space\- or colon\-separated) list of filesystem paths specified by
199 DTDs or entities. Enclose space\-separated lists by quotation marks.
201 \fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
202 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.
205 Validate after parsing has completed.
208 Use the push mode of the parser.
211 Output any parsable portions of an invalid document.
213 \fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
214 Use RelaxNG file named
219 Repeat 100 times, for timing or profiling.
221 \fB\-\-schema \fR\fB\fISCHEMA\fR\fR
229 Run a navigating shell. Details on available commands in shell mode are below (see
230 the section called \(lqSHELL COMMANDS\(rq).
235 \- useful when used in combination with
239 options for validation of files that are too large to be held in memory.
242 Test user input/output support.
245 Output information about the time it takes
247 to perform the various steps.
250 Determine if the document is a valid instance of the included Document Type Definition (DTD). A
252 to be validated against also can be specified at the command line using the
256 also checks to determine if the document is well\-formed.
259 Display the version of
264 Test the walker module, which is a reader interface but for a document tree, instead of using the reader
266 on an unparsed document it works on an existing in\-memory tree. Used for debugging.
269 Do XInclude processing.
272 Used in conjunction with
273 \fB\-\-html\fR. Usually when
275 is parsed the document is saved with the
277 serializer. But with this option the resulting document is saved with the
279 serializer. This is primarily used to generate
287 offers an interactive shell mode invoked with the
289 command. Available commands in shell mode include (in alphabetical order):
299 \fBcat \fR\fB\fINODE\fR\fR
300 Display the given node or the current one.
302 \fBcd \fR\fB\fIPATH\fR\fR
303 Change the current node to the given path (if unique) or root if no argument is given.
305 \fBdir \fR\fB\fIPATH\fR\fR
306 Dumps information about the node (namespace, attributes, content).
308 \fBdu \fR\fB\fIPATH\fR\fR
309 Show the structure of the subtree under the given path or the current node.
318 Display memory usage.
320 \fBload \fR\fB\fIFILENAME\fR\fR
321 Load a new document with the given filename.
323 \fBls \fR\fB\fIPATH\fR\fR
324 List contents of the given path or the current directory.
327 Display the path to the current node.
332 \fBsave \fR\fB\fIFILENAME\fR\fR
333 Save the current document to the given filename or to the original name.
336 Check the document for errors.
338 \fBwrite \fR\fB\fIFILENAME\fR\fR
339 Write the current node to the given filename.
342 \fBSGML_CATALOG_FILES\fR
344 catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
345 \fBSGML_CATALOG_FILES\fR
346 environment variable to a list of catalogs. An empty one should deactivate loading the default
347 \fI/etc/sgml/catalog\fR
350 \fBXML_CATALOG_FILES\fR
352 catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
353 \fBXML_CATALOG_FILES\fR
354 environment variable to a list of catalogs. An empty one should deactivate loading the default
355 \fI/etc/xml/catalog\fR
358 \fBXML_DEBUG_CATALOG\fR
359 Setting the environment variable
360 \fBXML_DEBUG_CATALOG\fR
365 command outputs debugging information related to catalog operations.
368 Setting the environment variable
370 controls the indentation. The default value is two spaces " ".
374 return codes provide information that can be used when calling it from scripts.
393 Error in schema compilation
399 Error in pattern (generated when
404 Error in Reader registration (generated when
405 \fB\-\-chkregister\fR
414 More information can be found at
419 \fI\%http://www.xmlsoft.org/\fR
425 \fI\%http://www.w3.org/TR/xslt\fR
427 John Fleck <jfleck@inkstain.net>, Ziying Sherwin <sherwin@nlm.nih.gov>, Heiko Rupp <hwr@pilhuhn.de>.