updated libxml2 to 2.5.10
[TestXSLT.git] / libxml2 / doc / xmllint.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "XMLLINT" 1 "" "" "xmllint Manual"
21 .SH NAME
22 xmllint \- command line XML tool
23 .SH "SYNOPSIS"
24
25 .nf
26 \fBxmllint\fR [\fB--version\fR | \fB--debug\fR | \fB--shell\fR | \fB--debugent\fR |
27         \fB--copy\fR | \fB--recover\fR | \fB--noent\fR | \fB--noout\fR | \fB--htmlout\fR
28         | \fB--nowrap\fR | \fB--valid\fR | \fB--postvalid\fR | \fB--dtdvalid
29         \fIURL\fR\fR | \fB--timing\fR | \fB--repeat\fR | \fB--insert\fR | \fB--compress\fR
30         | \fB--sgml\fR | \fB--html\fR | \fB--push\fR | \fB--memory\fR | \fB--nowarning\fR
31         | \fB--noblanks\fR | \fB--format\fR | \fB--testIO\fR | \fB--encode \fIencoding\fR\fR
32         | \fB--catalogs\fR | \fB--nocatalogs\fR | \fB--auto\fR | \fB--xinclude\fR
33         | \fB--loaddtd\fR | \fB--dtdattr\fR | \fB--dropdtd\fR | \fB--stream\fR
34         | \fB--chkregister\fR | \fB--relaxng\fR | \fB--schema\fR | \fB--nonet\fR]
35         [\fBxmlfile\fR]
36 .fi
37
38 .SH "INTRODUCTION"
39
40 .PP
41 The xmllint program parses one or more XML files, specified on the command line as \fIxmlfile\fR. It prints various types of output, depending upon the options selected. It is useful for detecting errors both in XML code and in the XML parser itself.
42
43 .PP
44 It is included in libxml2.
45
46 .SH "OPTIONS"
47
48 .TP
49 \fB--version\fR
50 Display the version of libxml2 used.
51
52 .TP
53 \fB--debug\fR
54 Parse a file and output an annotated tree of the in-memory version of the document.
55
56 .TP
57 \fB--shell\fR
58 Run a navigating shell. Details on available commands in shell mode are below.
59
60 .TP
61 \fB--debugent\fR
62 Debug the entities defined in the document.
63
64 .TP
65 \fB--copy\fR
66 Test the internal copy implementation.
67
68 .TP
69 \fB--recover\fR
70 Output any parsable portions of an invalid document.
71
72 .TP
73 \fB--noent\fR
74 Substitute entity values for entity references. By default, xmllint leaves entity references in place.
75
76 .TP
77 \fB--noout\fR
78 Suppress output. By default, xmllint outputs the result tree.
79
80 .TP
81 \fB--htmlout\fR
82 Output results as an HTML file. This causes xmllint to output the necessary HTML tags surrounding the result tree output so the results can be displayed in a browser.
83
84 .TP
85 \fB--nowrap \fR
86 Do not output HTML doc wrapper.
87
88 .TP
89 \fB--valid \fR
90 Determine if the document is a valid instance of the included Document Type Definition (DTD). A DTD to be validated against also can be specified at the command line using the \fB--dtdvalid\fR option. By default, xmllint also checks to determine if the document is well-formed.
91
92 .TP
93 \fB--postvalid\fR
94 Validate after parsing is completed.
95
96 .TP
97 \fB--dtdvalid\fR \fIURL\fR
98 Use the DTD specified by \fIURL\fR for validation.
99
100 .TP
101 \fB--timing\fR
102 Output information about the time it takes xmllint to perform the various steps.
103
104 .TP
105 \fB--repeat\fR
106 Repeat 100 times, for timing or profiling.
107
108 .TP
109 \fB--insert\fR
110 Test for valid insertions.
111
112 .TP
113 \fB--compress\fR
114 Turn on gzip compression of output.
115
116 .TP
117 \fB--sgml\fR
118 Use the DocBook SGML parser. This allows documents written in SGML DocBook to be converted into an in-memory tree and treated as if they were written in XML.
119
120 .TP
121 \fB--html\fR
122 Use the HTML parser.
123
124 .TP
125 \fB--push\fR
126 Use the push mode of the parser.
127
128 .TP
129 \fB--memory\fR
130 Parse from memory.
131
132 .TP
133 \fB--nowarning\fR
134 Do not emit warnings from the parser and/or validator.
135
136 .TP
137 \fB--noblanks\fR
138 Drop ignorable blank spaces.
139
140 .TP
141 \fB--format\fR
142 Reformat and reindent the output. The $XMLLINT_INDENT environment variable controls the indentation (default value is two spaces " ").
143
144 .TP
145 \fB--testIO\fR
146 Test user input/output support.
147
148 .TP
149 \fB--encode\fR \fIencoding\fR
150 Output in the given encoding.
151
152 .TP
153 \fB--catalogs\fR
154 Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog is used by default.
155
156 .TP
157 \fB--nocatalogs\fR
158 Do not use any catalogs.
159
160 .TP
161 \fB--auto\fR
162 Generate a small document for testing purposes.
163
164 .TP
165 \fB--xinclude\fR
166 Do XInclude processing.
167
168 .TP
169 \fB--loaddtd\fR
170 Fetch external DTD.
171
172 .TP
173 \fB--dtdattr\fR
174 Fetch external DTD and populate the tree with inherited attributes.
175
176 .TP
177 \fB--dropdtd\fR
178 Remove DTD from output.
179
180 .TP
181 \fB--stream\fR
182 Use 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.
183
184 .TP
185 \fB--chkregister\fR
186 Turn on node registration. Useful for developeres testing libxml2 node tracking code.
187
188 .TP
189 \fB--relaxng\fR \fIschema\fR
190 Use RelaxNG file named \fIschema\fR for validation.
191
192 .TP
193 \fB--schema\fR \fIschema\fR
194 Use a W3C XML Schema file named \fIschema\fR for validation.
195
196 .TP
197 \fB--nonet\fR
198 Do not use the Internet to fetch DTD's or entities.
199
200 .SH "SHELL"
201
202 .PP
203  xmllint offers an interactive shell mode invoked with the \fB--shell\fR command. Available commands in shell mode include:
204
205 .TP
206 \fBbase\fR
207 display XML base of the node
208
209 .TP
210 \fBbye\fR
211 leave shell
212
213 .TP
214 \fBcat node\fR
215 Display node if given or current node.
216
217 .TP
218 \fBcd path\fR
219 Change the current node to \fIpath\fR (if given and unique) or root if no argument given.
220
221 .TP
222 \fBdir path\fR
223 Dumps information about the node (namespace, attributes, content).
224
225 .TP
226 \fBdu path\fR
227 Show the structure of the subtree under path or the current node.
228
229 .TP
230 \fBexit\fR
231 Leave the shell.
232
233 .TP
234 \fBhelp\fR
235 Show this help.
236
237 .TP
238 \fBfree\fR
239 Display memory usage.
240
241 .TP
242 \fBload name\fR
243 Load a new document with the given name.
244
245 .TP
246 \fBls path\fR
247 List contents of \fIpath\fR (if given) or the current directory.
248
249 .TP
250 \fBpwd\fR
251 Display the path to the current node.
252
253 .TP
254 \fBquit\fR
255 Leave the shell.
256
257 .TP
258 \fBsave name\fR
259 Saves the current document to \fIname\fR if given or to the original name.
260
261 .TP
262 \fBvalidate\fR
263 Check the document for error.
264
265 .TP
266 \fBwrite name\fR
267 Write the current node to the given filename.
268
269 .SH "DEBUGGING CATALOGS"
270
271 .PP
272 Setting the environment variable \fIXML_DEBUG_CATALOG\fR using the command \fB"export XML_DEBUG_CATALOG="\fR outputs debugging information related to catalog operations.
273
274 .SH AUTHORS
275 John Fleck, Ziying Sherwin, Heiko Rupp.