components/libxml2/xmllint.1
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Wed, 27 Apr 2011 22:40:44 -0700
changeset 206 a4474882bf60
parent 181 87e11e685b1f
permissions -rw-r--r--
7010355 python needs to be packaged to separate out non-core dependencies 7035055 move apr and apr-util to userland (fix history) 7035672 subversion needs to move to Userland (fix download, build, missing files) 7038682 components should take advantage of automatic .pyc file action creation 7038812 userland shared-macros.mk should add bittedness to more macros 7038816 userland makefiles should declare some phony targets.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
148
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
.TH xmllint 1 "2001 Nov 26"
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
.SH NAME
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
xmllint \- command line XML tool
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
.SH "SYNOPSIS"
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
\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]
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
.SH "INTRODUCTION"
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
.PP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
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.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
.PP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
It is included in libxml2.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
.SH "OPTIONS"
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
\fB--version\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
Display the version of libxml2 used.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
\fB--debug\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
Parse a file and output an annotated tree of the in-memory version of the document.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
\fB--shell\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
Run a navigating shell.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
\fB--debugent\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
Debug the entities defined in the document.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
\fB--copy\fR 
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
Test the internal copy implementation.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
\fB--recover\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
Output any parsable portions of an invalid document.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
\fB--noent\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
Substitute entity values for entity references. By default, xmllint leaves entity references in place.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
\fB--noout\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
Suppress output. By default, xmllint outputs the result tree.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    39
\fB--htmlout\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
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.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
\fB--nowrap \fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
Do not output HTML doc wrapper.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    44
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    45
\fB--valid \fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    46
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.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
\fB--postvalid\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
Validate after parsing is completed.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
 \fB--dtdvalid\fR \fIURL\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
Use the DTD specified by \fIURL\fR for validation.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
\fB--timing\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
Output information about the time it takes xmllint to perform the various steps.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
\fB--repeat\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    58
Repeat 100 times, for timing or profiling.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    59
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    60
\fB--insert\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    61
Test for valid insertions.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    62
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    63
\fB--compress\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    64
Turn on gzip compression of output.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    65
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    66
\fB--sgml\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
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.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    69
\fB--html\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    70
Use the HTML parser.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    71
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    72
\fB--push\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    73
Use the push mode of the parser.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    74
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    75
\fB--memory\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    76
Parse from memory.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    77
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    78
\fB--nowarning\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    79
Do not emit warnings from the parser and/or validator.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    80
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    81
\fB--noblanks\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    82
Drop ignorable blank spaces.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    83
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    84
\fB--format\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    85
Reformat and reindent the output.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    86
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    87
\fB--testIO\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    88
Test user input/output support.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    89
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    90
\fB--encode\fR \fIencoding\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    91
Output in the given encoding.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    92
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    93
\fB--catalogs\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    94
Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog is used by default.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    95
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    96
\fB--nocatalogs\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    97
Do not use any catalogs.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    98
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    99
\fB--auto\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   100
Generate a small document for testing purposes.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   101
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   102
\fB--xinclude\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   103
Do XInclude processing.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   104
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   105
\fB--loaddtd\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   106
Fetch external DTD.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   107
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   108
\fB--dtdattr\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   109
Fetch external DTD and populate the tree with inherited attributes.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   110
.TP
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   111
\fB--dropdtd\fR
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   112
Remove DTD from output.
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   113
.SH AUTHORS
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   114
John Fleck <[email protected]>, Ziying Sherwin <[email protected]>, Heiko Rupp <[email protected]>
33ca3897ae25 7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   115
This is release 0.2 of the xmllint Manual.