blob: c5dcafc7973b3f1849f9fa18ecfd94f3bc8ac934 [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"
John Fleck027edfb2001-11-04 20:13:58 +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\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 Fleck42304042001-11-18 00:18:06 +0000195.SH "SHELL"
196
197.PP
198xmllint offers an interactive shell mode invoked with the \fB--shell\fR command. Available commands in shell mode include:
199
200.TP
201\fBbase\fR
202
203display XML base of the node
204
205.TP
206\fBbye\fR
207
208leave shell
209
210.TP
211\fBcat \fInode\fR\fR
212
213Display node if given or current node.
214
215.TP
216\fBcd \fIpath\fR\fR
217
218Change the current node to \fIpath\fR (if given and unique) or root if no argument given.
219
220.TP
221\fBdir \fIpath\fR\fR
222
223Dumps information about the node (namespace, attributes, content).
224
225.TP
226\fBdu \fIpath\fR\fR
227
228Show the structure of the subtree under path or the current node.
229
230.TP
231\fBexit\fR
232
233Leave the shell.
234
235.TP
236\fBhelp\fR
237
238Show this help.
239
240.TP
241\fBfree\fR
242
243Display memory usage.
244
245.TP
246\fBload \fIname\fR\fR
247
248Load a new document with the given name.
249
250.TP
251\fBls \fIpath\fR\fR
252
253List contents of \fIpath\fR (if given) or the current directory.
254
255.TP
256\fBpwd\fR
257
258Display the path to the current node.
259
260.TP
261\fBquit\fR
262
263Leave the shell.
264
265.TP
266\fBsave \fIname\fR\fR
267
268Saves the current document to \fIname\fR if given or to the original name.
269
270.TP
271\fBvalidate\fR
272
273Check the document for error.
274
275.TP
276\fBwrite \fIname\fR\fR
277
278Write the current node to the given filename.
279
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000280.SH AUTHOR
281Copyright 2001
282.Sp
MST 2001 John Fleck42304042001-11-18 00:18:06 +0000283John Fleck <jfleck@inkstain.net>Ziying Sherwin <sherwin@nlm.nih.gov>Heiko Rupp <hwr@pilhuhn.de>
MDT 2001 John Fleckfd32de62001-10-27 20:14:01 +0000284.PP
285Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License: \fIgnome-help:fdl\fR, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found here: \fIgnome-help:fdl\fR.
286
287.PP
288Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and those trademarks are made aware to the members of the GNOME Documentation Project, the names have been printed in caps or initial caps.
289This is release 0.1 of the xmllint Manual.