MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame^] | 1 | <?xml version="1.0"?> |
| 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ |
| 4 | ]> |
| 5 | <refentry> |
| 6 | <refentryinfo> |
| 7 | <title>xmllint Manual</title> |
| 8 | <copyright> |
| 9 | <year>2001</year> |
| 10 | </copyright> |
| 11 | <author> |
| 12 | <firstname>John</firstname> |
| 13 | <surname>Fleck</surname> |
| 14 | </author> |
| 15 | <address><email>jfleck@inkstain.net</email></address> |
| 16 | <author> |
| 17 | <firstname>Ziying</firstname> |
| 18 | <surname>Sherwin</surname> |
| 19 | </author> |
| 20 | <address><email>sherwin@nlm.nih.gov</email></address> |
| 21 | <legalnotice id="legalnotice"> |
| 22 | <para>Permission is granted to copy, distribute and/or modify this document |
| 23 | under the terms of the <ulink type="help" url="gnome-help:fdl"><citetitle>GNU Free Documentation |
| 24 | License</citetitle></ulink>, Version 1.1 or any later version |
| 25 | published by the Free Software Foundation with no Invariant Sections, |
| 26 | no Front-Cover Texts, and no Back-Cover Texts. A copy of the license |
| 27 | can be found <ulink type="help" url="gnome-help:fdl">here</ulink>. |
| 28 | </para> |
| 29 | <para>Many of the names used by companies to distinguish their products and |
| 30 | services are claimed as trademarks. Where those names appear in any |
| 31 | GNOME documentation, and those trademarks are made aware to the members |
| 32 | of the GNOME Documentation Project, the names have been printed in caps |
| 33 | or initial caps. |
| 34 | </para> |
| 35 | </legalnotice> |
| 36 | <releaseinfo>This is release 0.1 of the xmllint Manual.</releaseinfo> |
| 37 | </refentryinfo> |
| 38 | |
| 39 | <refmeta> |
| 40 | <refentrytitle>xmllint</refentrytitle> |
| 41 | <manvolnum>1</manvolnum> |
| 42 | </refmeta> |
| 43 | |
| 44 | <refnamediv> |
| 45 | <refname>xmllint</refname> |
| 46 | <refpurpose>command line <acronym>XML</acronym> tool</refpurpose> |
| 47 | </refnamediv> |
| 48 | |
| 49 | <refsynopsisdiv> |
| 50 | <cmdsynopsis> |
| 51 | <command>xmllint</command> |
| 52 | <group> |
| 53 | <arg>--version</arg> |
| 54 | <arg>--debug</arg> |
| 55 | <arg>--shell</arg> |
| 56 | <arg>--debugent</arg> |
| 57 | <arg>--copy</arg> |
| 58 | <arg>--recover</arg> |
| 59 | <arg>--noent</arg> |
| 60 | <arg>--noout</arg> |
| 61 | <arg>--htmlout</arg> |
| 62 | <arg>--nowrap</arg> |
| 63 | <arg>--valid</arg> |
| 64 | <arg>--postvalid</arg> |
| 65 | <arg>--dtdvalid <replaceable>URL</replaceable></arg> |
| 66 | <arg>--timing</arg> |
| 67 | <arg>--repeat</arg> |
| 68 | <arg>--insert</arg> |
| 69 | <arg>--compress</arg> |
| 70 | <arg>--html</arg> |
| 71 | <arg>--push</arg> |
| 72 | <arg>--memory</arg> |
| 73 | <arg>--nowarning</arg> |
| 74 | <arg>--noblanks</arg> |
| 75 | <arg>--format</arg> |
| 76 | <arg>--testIO</arg> |
| 77 | <arg>--encode <replaceable>encoding</replaceable></arg> |
| 78 | <arg>--catalogs</arg> |
| 79 | <arg>--nocatalogs</arg> |
| 80 | <arg>--auto</arg> |
| 81 | <arg>--xinclude</arg> |
| 82 | <arg>--loaddtd</arg> |
| 83 | <arg>--dtdattr</arg> |
| 84 | </group> |
| 85 | <arg><option><replaceable>xmlfile</replaceable></option></arg> |
| 86 | </cmdsynopsis> |
| 87 | </refsynopsisdiv> |
| 88 | |
| 89 | <refsect1 id="introduction"> |
| 90 | <title>Introduction</title> |
| 91 | <para> |
| 92 | The xmllint program parses one or more XML files, specified on the |
| 93 | command line as <replaceable>xmlfile</replaceable>. It prints various |
| 94 | types of output, depending upon the options selected. It is useful for |
| 95 | detecting errors both in <acronym>XML</acronym> code and in the |
| 96 | <acronym>XML</acronym> parser itself. |
| 97 | </para> |
| 98 | |
| 99 | <para> |
| 100 | It is included in <application>libxml2</application>. |
| 101 | </para> |
| 102 | </refsect1> |
| 103 | <refsect1 id="options"> |
| 104 | <title>Options</title> |
| 105 | <variablelist> |
| 106 | <varlistentry> |
| 107 | <term><option>--version</option></term> |
| 108 | <listitem> |
| 109 | <simpara> |
| 110 | Display the version of |
| 111 | <application>libxml2</application> used. |
| 112 | </simpara> |
| 113 | </listitem> |
| 114 | </varlistentry> |
| 115 | |
| 116 | <varlistentry> |
| 117 | <term><option>--debug</option></term> |
| 118 | <listitem> |
| 119 | <simpara> |
| 120 | Parse a file and output an annotated tree of the |
| 121 | in-memory version of the document. |
| 122 | </simpara> |
| 123 | </listitem> |
| 124 | </varlistentry> |
| 125 | |
| 126 | <varlistentry> |
| 127 | <term><option>--shell</option></term> |
| 128 | <listitem> |
| 129 | <simpara> |
| 130 | Run a navigating shell. |
| 131 | </simpara> |
| 132 | </listitem> |
| 133 | </varlistentry> |
| 134 | |
| 135 | <varlistentry> |
| 136 | <term><option>--debugent</option></term> |
| 137 | <listitem> |
| 138 | <simpara> |
| 139 | Debug the entities defined in the document. |
| 140 | </simpara> |
| 141 | </listitem> |
| 142 | </varlistentry> |
| 143 | |
| 144 | <varlistentry> |
| 145 | <term><option>--copy</option> </term> |
| 146 | <listitem> |
| 147 | <simpara> |
| 148 | Test the internal copy implementation. |
| 149 | </simpara> |
| 150 | </listitem> |
| 151 | </varlistentry> |
| 152 | |
| 153 | |
| 154 | <varlistentry> |
| 155 | <term><option>--recover</option></term> |
| 156 | <listitem> |
| 157 | <simpara> |
| 158 | Output any parsable portions of an invalid |
| 159 | document. |
| 160 | </simpara> |
| 161 | </listitem> |
| 162 | </varlistentry> |
| 163 | |
| 164 | <varlistentry> |
| 165 | <term><option>--noent</option></term> |
| 166 | <listitem> |
| 167 | <simpara> |
| 168 | Substitute entity values for entity |
| 169 | references. By default, <application>xmllint</application> leaves entity |
| 170 | references in place. |
| 171 | </simpara> |
| 172 | </listitem> |
| 173 | </varlistentry> |
| 174 | |
| 175 | <varlistentry> |
| 176 | <term><option>--noout</option></term> |
| 177 | <listitem> |
| 178 | <simpara> |
| 179 | Suppress output. By default, |
| 180 | <application>xmllint</application> outputs the result tree. |
| 181 | </simpara> |
| 182 | </listitem> |
| 183 | </varlistentry> |
| 184 | |
| 185 | <varlistentry> |
| 186 | <term><option>--htmlout</option></term> |
| 187 | <listitem> |
| 188 | <simpara> |
| 189 | Output results as an <acronym>HTML</acronym> |
| 190 | file. This causes <application>xmllint</application> to output |
| 191 | the necessary <acronym>HTML</acronym> tags surrounding the result tree |
| 192 | output so the results can be displayed in a browser. |
| 193 | </simpara> |
| 194 | </listitem> |
| 195 | </varlistentry> |
| 196 | |
| 197 | <varlistentry> |
| 198 | <term><option>--nowrap </option></term> |
| 199 | <listitem> |
| 200 | <simpara> |
| 201 | Do not output HTML doc wrapper. |
| 202 | </simpara> |
| 203 | </listitem> |
| 204 | </varlistentry> |
| 205 | |
| 206 | <varlistentry> |
| 207 | <term><option>--valid </option></term> |
| 208 | <listitem> |
| 209 | <simpara> |
| 210 | Determine if the document is a valid instance |
| 211 | of the included Document Type Definition (<acronym>DTD</acronym>). A |
| 212 | <acronym>DTD</acronym> to be validated against also can be specified at |
| 213 | the command line using the <option>--dtdvalid</option> option. By default, |
| 214 | <application>xmllint</application> also checks to determine if the |
| 215 | document is well-formed. |
| 216 | </simpara> |
| 217 | </listitem> |
| 218 | </varlistentry> |
| 219 | |
| 220 | <varlistentry> |
| 221 | <term><option>--postvalid</option></term> |
| 222 | <listitem> |
| 223 | <simpara> |
| 224 | Validate after parsing is completed. |
| 225 | </simpara> |
| 226 | </listitem> |
| 227 | </varlistentry> |
| 228 | |
| 229 | <varlistentry> |
| 230 | <term> <option>--dtdvalid</option> <replaceable>URL</replaceable></term> |
| 231 | <listitem> |
| 232 | <simpara> |
| 233 | Use the |
| 234 | <acronym>DTD</acronym> specified by <replaceable>URL</replaceable> for |
| 235 | validation. |
| 236 | </simpara> |
| 237 | </listitem> |
| 238 | </varlistentry> |
| 239 | |
| 240 | <varlistentry> |
| 241 | <term><option>--timing</option></term> |
| 242 | <listitem> |
| 243 | <simpara> |
| 244 | Output information about the time it takes |
| 245 | <application>xmllint</application> to perform the various steps. |
| 246 | </simpara> |
| 247 | </listitem> |
| 248 | </varlistentry> |
| 249 | |
| 250 | <varlistentry> |
| 251 | <term><option>--repeat</option></term> |
| 252 | <listitem> |
| 253 | <simpara> |
| 254 | Repeat 100 times, for timing or profiling. |
| 255 | </simpara> |
| 256 | </listitem> |
| 257 | </varlistentry> |
| 258 | |
| 259 | <varlistentry> |
| 260 | <term><option>--insert</option></term> |
| 261 | <listitem> |
| 262 | <simpara> |
| 263 | Test for valid insertions. |
| 264 | </simpara> |
| 265 | </listitem> |
| 266 | </varlistentry> |
| 267 | |
| 268 | <varlistentry> |
| 269 | <term><option>--compress</option></term> |
| 270 | <listitem> |
| 271 | <simpara> |
| 272 | Turn on gzip compression of output. |
| 273 | </simpara> |
| 274 | </listitem> |
| 275 | </varlistentry> |
| 276 | |
| 277 | <varlistentry> |
| 278 | <term><option>--html</option></term> |
| 279 | <listitem> |
| 280 | <simpara> |
| 281 | Use the <acronym>HTML</acronym> parser. |
| 282 | </simpara> |
| 283 | </listitem> |
| 284 | </varlistentry> |
| 285 | |
| 286 | <varlistentry> |
| 287 | <term><option>--push</option></term> |
| 288 | <listitem> |
| 289 | <simpara> |
| 290 | Use the push mode of the parser. |
| 291 | </simpara> |
| 292 | </listitem> |
| 293 | </varlistentry> |
| 294 | |
| 295 | |
| 296 | <varlistentry> |
| 297 | <term><option>--memory</option></term> |
| 298 | <listitem> |
| 299 | <simpara> |
| 300 | Parse from memory. |
| 301 | </simpara> |
| 302 | </listitem> |
| 303 | </varlistentry> |
| 304 | |
| 305 | <varlistentry> |
| 306 | <term><option>--nowarning</option></term> |
| 307 | <listitem> |
| 308 | <simpara> |
| 309 | Do not emit warnings from the parser and/or validator. |
| 310 | </simpara> |
| 311 | </listitem> |
| 312 | </varlistentry> |
| 313 | |
| 314 | <varlistentry> |
| 315 | <term><option>--noblanks</option></term> |
| 316 | <listitem> |
| 317 | <simpara> |
| 318 | Drop ignorable blank spaces. |
| 319 | </simpara> |
| 320 | </listitem> |
| 321 | </varlistentry> |
| 322 | |
| 323 | <varlistentry> |
| 324 | <term><option>--format</option></term> |
| 325 | <listitem> |
| 326 | <simpara> |
| 327 | Reformat and reindent the output. |
| 328 | </simpara> |
| 329 | </listitem> |
| 330 | </varlistentry> |
| 331 | |
| 332 | <varlistentry> |
| 333 | <term><option>--testIO</option></term> |
| 334 | <listitem> |
| 335 | <simpara> |
| 336 | Test user input/output support. |
| 337 | </simpara> |
| 338 | </listitem> |
| 339 | </varlistentry> |
| 340 | |
| 341 | <varlistentry> |
| 342 | <term><option>--encode</option> <replaceable>encoding</replaceable></term> |
| 343 | <listitem> |
| 344 | <simpara> |
| 345 | Output in the given encoding. |
| 346 | </simpara> |
| 347 | </listitem> |
| 348 | </varlistentry> |
| 349 | |
| 350 | <varlistentry> |
| 351 | <term><option>--catalogs</option></term> |
| 352 | <listitem> |
| 353 | <simpara> |
| 354 | Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog |
| 355 | is used by default. |
| 356 | </simpara> |
| 357 | </listitem> |
| 358 | </varlistentry> |
| 359 | |
| 360 | <varlistentry> |
| 361 | <term><option>--nocatalogs</option></term> |
| 362 | <listitem> |
| 363 | <simpara> |
| 364 | Do not use any catalogs. |
| 365 | </simpara> |
| 366 | </listitem> |
| 367 | </varlistentry> |
| 368 | |
| 369 | <varlistentry> |
| 370 | <term><option>--auto</option></term> |
| 371 | <listitem> |
| 372 | <simpara> |
| 373 | Generate a small document for testing purposes. |
| 374 | </simpara> |
| 375 | </listitem> |
| 376 | </varlistentry> |
| 377 | |
| 378 | <varlistentry> |
| 379 | <term><option>--xinclude</option></term> |
| 380 | <listitem> |
| 381 | <simpara> |
| 382 | Do XInclude processing. |
| 383 | </simpara> |
| 384 | </listitem> |
| 385 | </varlistentry> |
| 386 | <varlistentry> |
| 387 | <term><option>--loaddtd</option></term> |
| 388 | <listitem> |
| 389 | <simpara> |
| 390 | Fetch external DTD. |
| 391 | </simpara> |
| 392 | </listitem> |
| 393 | </varlistentry> |
| 394 | |
| 395 | <varlistentry> |
| 396 | <term><option>--dtdattr</option></term> |
| 397 | <listitem> |
| 398 | <simpara> |
| 399 | Fetch external DTD and populate the tree with inherited attributes. |
| 400 | </simpara> |
| 401 | </listitem> |
| 402 | </varlistentry> |
| 403 | |
| 404 | </variablelist> |
| 405 | </refsect1> |
| 406 | </refentry> |