MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 1 | .\"Generated by db2man.xsl. Don't modify this, modify the source. |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 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 | .. |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 20 | .TH "XMLLINT" 1 "" "" "xmllint Manual" |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 21 | .SH NAME |
| 22 | xmllint \- command line XML tool |
| 23 | .SH "SYNOPSIS" |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 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] [\fBxmlfile\fR] |
| 34 | |
| 35 | .fi |
| 36 | |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 37 | .SH "INTRODUCTION" |
| 38 | |
| 39 | .PP |
| 40 | 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. |
| 41 | |
| 42 | .PP |
| 43 | It is included in libxml2. |
| 44 | |
| 45 | .SH "OPTIONS" |
| 46 | |
| 47 | .TP |
| 48 | \fB--version\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 49 | Display the version of libxml2 used. |
| 50 | |
| 51 | .TP |
| 52 | \fB--debug\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 53 | Parse a file and output an annotated tree of the in-memory version of the document. |
| 54 | |
| 55 | .TP |
| 56 | \fB--shell\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 57 | Run a navigating shell. Details on available commands in shell mode are below. |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 58 | |
| 59 | .TP |
| 60 | \fB--debugent\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 61 | Debug the entities defined in the document. |
| 62 | |
| 63 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 64 | \fB--copy\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 65 | Test the internal copy implementation. |
| 66 | |
| 67 | .TP |
| 68 | \fB--recover\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 69 | Output any parsable portions of an invalid document. |
| 70 | |
| 71 | .TP |
| 72 | \fB--noent\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 73 | Substitute entity values for entity references. By default, xmllint leaves entity references in place. |
| 74 | |
| 75 | .TP |
| 76 | \fB--noout\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 77 | Suppress output. By default, xmllint outputs the result tree. |
| 78 | |
| 79 | .TP |
| 80 | \fB--htmlout\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 81 | 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. |
| 82 | |
| 83 | .TP |
| 84 | \fB--nowrap \fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 85 | Do not output HTML doc wrapper. |
| 86 | |
| 87 | .TP |
| 88 | \fB--valid \fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 89 | 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. |
| 90 | |
| 91 | .TP |
| 92 | \fB--postvalid\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 93 | Validate after parsing is completed. |
| 94 | |
| 95 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 96 | \fB--dtdvalid\fR \fIURL\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 97 | Use the DTD specified by \fIURL\fR for validation. |
| 98 | |
| 99 | .TP |
| 100 | \fB--timing\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 101 | Output information about the time it takes xmllint to perform the various steps. |
| 102 | |
| 103 | .TP |
| 104 | \fB--repeat\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 105 | Repeat 100 times, for timing or profiling. |
| 106 | |
| 107 | .TP |
| 108 | \fB--insert\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 109 | Test for valid insertions. |
| 110 | |
| 111 | .TP |
| 112 | \fB--compress\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 113 | Turn on gzip compression of output. |
| 114 | |
| 115 | .TP |
John Fleck | 027edfb | 2001-11-04 20:13:58 +0000 | [diff] [blame] | 116 | \fB--sgml\fR |
John Fleck | 027edfb | 2001-11-04 20:13:58 +0000 | [diff] [blame] | 117 | 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. |
| 118 | |
| 119 | .TP |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 120 | \fB--html\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 121 | Use the HTML parser. |
| 122 | |
| 123 | .TP |
| 124 | \fB--push\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 125 | Use the push mode of the parser. |
| 126 | |
| 127 | .TP |
| 128 | \fB--memory\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 129 | Parse from memory. |
| 130 | |
| 131 | .TP |
| 132 | \fB--nowarning\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 133 | Do not emit warnings from the parser and/or validator. |
| 134 | |
| 135 | .TP |
| 136 | \fB--noblanks\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 137 | Drop ignorable blank spaces. |
| 138 | |
| 139 | .TP |
| 140 | \fB--format\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 141 | Reformat and reindent the output. |
| 142 | |
| 143 | .TP |
| 144 | \fB--testIO\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 145 | Test user input/output support. |
| 146 | |
| 147 | .TP |
| 148 | \fB--encode\fR \fIencoding\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 149 | Output in the given encoding. |
| 150 | |
| 151 | .TP |
| 152 | \fB--catalogs\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 153 | Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog is used by default. |
| 154 | |
| 155 | .TP |
| 156 | \fB--nocatalogs\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 157 | Do not use any catalogs. |
| 158 | |
| 159 | .TP |
| 160 | \fB--auto\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 161 | Generate a small document for testing purposes. |
| 162 | |
| 163 | .TP |
| 164 | \fB--xinclude\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 165 | Do XInclude processing. |
| 166 | |
| 167 | .TP |
| 168 | \fB--loaddtd\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 169 | Fetch external DTD. |
| 170 | |
| 171 | .TP |
| 172 | \fB--dtdattr\fR |
MDT 2001 John Fleck | fd32de6 | 2001-10-27 20:14:01 +0000 | [diff] [blame] | 173 | Fetch external DTD and populate the tree with inherited attributes. |
| 174 | |
MST 2001 John Fleck | 2323ac2 | 2001-12-14 04:24:50 +0000 | [diff] [blame] | 175 | .TP |
| 176 | \fB--dropdtd\fR |
MST 2001 John Fleck | 2323ac2 | 2001-12-14 04:24:50 +0000 | [diff] [blame] | 177 | Remove DTD from output. |
| 178 | |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 179 | .SH "SHELL" |
| 180 | |
| 181 | .PP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 182 | xmllint offers an interactive shell mode invoked with the \fB--shell\fR command. Available commands in shell mode include: |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 183 | |
| 184 | .TP |
| 185 | \fBbase\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 186 | display XML base of the node |
| 187 | |
| 188 | .TP |
| 189 | \fBbye\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 190 | leave shell |
| 191 | |
| 192 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 193 | \fBcat node\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 194 | Display node if given or current node. |
| 195 | |
| 196 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 197 | \fBcd path\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 198 | Change the current node to \fIpath\fR (if given and unique) or root if no argument given. |
| 199 | |
| 200 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 201 | \fBdir path\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 202 | Dumps information about the node (namespace, attributes, content). |
| 203 | |
| 204 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 205 | \fBdu path\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 206 | Show the structure of the subtree under path or the current node. |
| 207 | |
| 208 | .TP |
| 209 | \fBexit\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 210 | Leave the shell. |
| 211 | |
| 212 | .TP |
| 213 | \fBhelp\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 214 | Show this help. |
| 215 | |
| 216 | .TP |
| 217 | \fBfree\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 218 | Display memory usage. |
| 219 | |
| 220 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 221 | \fBload name\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 222 | Load a new document with the given name. |
| 223 | |
| 224 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 225 | \fBls path\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 226 | List contents of \fIpath\fR (if given) or the current directory. |
| 227 | |
| 228 | .TP |
| 229 | \fBpwd\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 230 | Display the path to the current node. |
| 231 | |
| 232 | .TP |
| 233 | \fBquit\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 234 | Leave the shell. |
| 235 | |
| 236 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 237 | \fBsave name\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 238 | Saves the current document to \fIname\fR if given or to the original name. |
| 239 | |
| 240 | .TP |
| 241 | \fBvalidate\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 242 | Check the document for error. |
| 243 | |
| 244 | .TP |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 245 | \fBwrite name\fR |
MST 2001 John Fleck | 4230404 | 2001-11-18 00:18:06 +0000 | [diff] [blame] | 246 | Write the current node to the given filename. |
| 247 | |
MST 2002 John Fleck | 6647aed | 2002-12-26 02:23:24 +0000 | [diff] [blame^] | 248 | .SH "DEBUGGING CATALOGS" |
| 249 | |
| 250 | .PP |
| 251 | Setting the environment variable \fIXML_DEBUG_CATALOG\fR using the command \fB"export XML_DEBUG_CATALOG="\fR outputs debugging information related to catalog operations. |
| 252 | |
| 253 | .SH AUTHORS |
| 254 | John Fleck, Ziying Sherwin, Heiko Rupp. |