blob: 0568025eceed6a4d77e9d7351bc4a5d4e27304c9 [file] [log] [blame]
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +00001."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
22xmllint \- command line XML tool
23.SH "SYNOPSIS"
MST 2001 John Fleck2323ac22001-12-14 04:24:50 +000024\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--htmlout\fR | \fB--nowrap\fR | \fB--valid\fR | \fB--postvalid\fR | \fB--dtdvalid \fIURL\fR \fR | \fB--timing\fR | \fB--repeat\fR | \fB--insert\fR | \fB--compress\fR | \fB--sgml\fR | \fB--html\fR | \fB--push\fR | \fB--memory\fR | \fB--nowarning\fR | \fB--noblanks\fR | \fB--format\fR | \fB--testIO\fR | \fB--encode \fIencoding\fR \fR | \fB--catalogs\fR | \fB--nocatalogs\fR | \fB--auto\fR | \fB--xinclude\fR | \fB--loaddtd\fR | \fB--dtdattr\fR | \fB--dropdtd\fR] [\fB\fIxmlfile\fR\fR]
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000025.SH "INTRODUCTION"
26
27.PP
28The 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.
29
30.PP
31It is included in libxml2.
32
33.SH "OPTIONS"
34
35.TP
36\fB--version\fR
37
38Display the version of libxml2 used.
39
40.TP
41\fB--debug\fR
42
43Parse a file and output an annotated tree of the in-memory version of the document.
44
45.TP
46\fB--shell\fR
47
MST 2001 John Fleck42304042001-11-18 00:18:06 +000048Run a navigating shell. Details on available commands in shell mode are below.
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +000049
50.TP
51\fB--debugent\fR
52
53Debug the entities defined in the document.
54
55.TP
56\fB--copy\fR
57
58Test the internal copy implementation.
59
60.TP
61\fB--recover\fR
62
63Output any parsable portions of an invalid document.
64
65.TP
66\fB--noent\fR
67
68Substitute entity values for entity references. By default, xmllint leaves entity references in place.
69
70.TP
71\fB--noout\fR
72
73Suppress output. By default, xmllint outputs the result tree.
74
75.TP
76\fB--htmlout\fR
77
78Output 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.
79
80.TP
81\fB--nowrap \fR
82
83Do not output HTML doc wrapper.
84
85.TP
86\fB--valid \fR
87
88Determine 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.
89
90.TP
91\fB--postvalid\fR
92
93Validate after parsing is completed.
94
95.TP
96 \fB--dtdvalid\fR \fIURL\fR
97
98Use the DTD specified by \fIURL\fR for validation.
99
100.TP
101\fB--timing\fR
102
103Output information about the time it takes xmllint to perform the various steps.
104
105.TP
106\fB--repeat\fR
107
108Repeat 100 times, for timing or profiling.
109
110.TP
111\fB--insert\fR
112
113Test for valid insertions.
114
115.TP
116\fB--compress\fR
117
118Turn on gzip compression of output.
119
120.TP
John Fleck027edfb2001-11-04 20:13:58 +0000121\fB--sgml\fR
122
123Use 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.
124
125.TP
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000126\fB--html\fR
127
128Use the HTML parser.
129
130.TP
131\fB--push\fR
132
133Use the push mode of the parser.
134
135.TP
136\fB--memory\fR
137
138Parse from memory.
139
140.TP
141\fB--nowarning\fR
142
143Do not emit warnings from the parser and/or validator.
144
145.TP
146\fB--noblanks\fR
147
148Drop ignorable blank spaces.
149
150.TP
151\fB--format\fR
152
153Reformat and reindent the output.
154
155.TP
156\fB--testIO\fR
157
158Test user input/output support.
159
160.TP
161\fB--encode\fR \fIencoding\fR
162
163Output in the given encoding.
164
165.TP
166\fB--catalogs\fR
167
168Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog is used by default.
169
170.TP
171\fB--nocatalogs\fR
172
173Do not use any catalogs.
174
175.TP
176\fB--auto\fR
177
178Generate a small document for testing purposes.
179
180.TP
181\fB--xinclude\fR
182
183Do XInclude processing.
184
185.TP
186\fB--loaddtd\fR
187
188Fetch external DTD.
189
190.TP
191\fB--dtdattr\fR
192
193Fetch external DTD and populate the tree with inherited attributes.
194
MST 2001 John Fleck2323ac22001-12-14 04:24:50 +0000195.TP
196\fB--dropdtd\fR
197
198Remove DTD from output.
199
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000200.SH "SHELL"
201
202.PP
203xmllint 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
208display XML base of the node
209
210.TP
211\fBbye\fR
212
213leave shell
214
215.TP
216\fBcat \fInode\fR\fR
217
218Display node if given or current node.
219
220.TP
221\fBcd \fIpath\fR\fR
222
223Change the current node to \fIpath\fR (if given and unique) or root if no argument given.
224
225.TP
226\fBdir \fIpath\fR\fR
227
228Dumps information about the node (namespace, attributes, content).
229
230.TP
231\fBdu \fIpath\fR\fR
232
233Show the structure of the subtree under path or the current node.
234
235.TP
236\fBexit\fR
237
238Leave the shell.
239
240.TP
241\fBhelp\fR
242
243Show this help.
244
245.TP
246\fBfree\fR
247
248Display memory usage.
249
250.TP
251\fBload \fIname\fR\fR
252
253Load a new document with the given name.
254
255.TP
256\fBls \fIpath\fR\fR
257
258List contents of \fIpath\fR (if given) or the current directory.
259
260.TP
261\fBpwd\fR
262
263Display the path to the current node.
264
265.TP
266\fBquit\fR
267
268Leave the shell.
269
270.TP
271\fBsave \fIname\fR\fR
272
273Saves the current document to \fIname\fR if given or to the original name.
274
275.TP
276\fBvalidate\fR
277
278Check the document for error.
279
280.TP
281\fBwrite \fIname\fR\fR
282
283Write the current node to the given filename.
284
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000285.SH AUTHOR
286Copyright 2001
287.Sp
MST 2001 John Fleck3fc555e2001-12-11 04:41:24 +0000288John Fleck <jfleck@inkstain.net>Ziying Sherwin <sherwin@nlm.nih.gov>Heiko Rupp <hwr@pilhuhn.de>This is release 0.2 of the xmllint Manual.