⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmllint.1

📁 libxml,在UNIX/LINUX下非常重要的一个库,为XML相关应用提供方便.目前上载的是最新版本,若要取得最新版本,请参考里面的readme.
💻 1
字号:
.\"Generated by db2man.xsl. Don't modify this, modify the source..de Sh \" Subsection.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Ip \" List item.br.ie \\n(.$>=3 .ne \\$3.el .ne 3.IP "\\$1" \\$2...TH "XMLLINT" 1 "" "" "xmllint Manual".SH NAMExmllint \- command line XML tool.SH "SYNOPSIS".ad l.hy 0.HP 8\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\-\-nonet\fR | \fB\-\-path\ \fIpaths\fR\fR | \fB\-\-load\-trace\fR | \fB\-\-htmlout\fR | \fB\-\-nowrap\fR | \fB\-\-valid\fR | \fB\-\-postvalid\fR | \fB\-\-dtdvalid\ \fIURL\fR\fR | \fB\-\-dtdvalidfpi\ \fIFPI\fR\fR | \fB\-\-timing\fR | \fB\-\-output\ \fIfile\fR\fR | \fB\-\-repeat\fR | \fB\-\-insert\fR | \fB\-\-compress\fR | \fB\-\-html\fR | \fB\-\-xmlout\fR | \fB\-\-push\fR | \fB\-\-memory\fR | \fB\-\-maxmem\ \fInbbytes\fR\fR | \fB\-\-nowarning\fR | \fB\-\-noblanks\fR | \fB\-\-nocdata\fR | \fB\-\-format\fR | \fB\-\-encode\ \fIencoding\fR\fR | \fB\-\-dropdtd\fR | \fB\-\-nsclean\fR | \fB\-\-testIO\fR | \fB\-\-catalogs\fR | \fB\-\-nocatalogs\fR | \fB\-\-auto\fR | \fB\-\-xinclude\fR | \fB\-\-noxincludenode\fR | \fB\-\-loaddtd\fR | \fB\-\-dtdattr\fR | \fB\-\-stream\fR | \fB\-\-walker\fR | \fB\-\-pattern\ \fIpatternvalue\fR\fR | \fB\-\-chkregister\fR | \fB\-\-relaxng\fR | \fB\-\-schema\fR | \fB\-\-c14n\fR] [\fB\fIxmlfile\fR\fR].ad.hy.SH "INTRODUCTION".PPThe xmllint program parses one or more XML files, specified on the command line as \fIxmlfile\fR (or the standard input if the filename provided is \- )\&. 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\&..PPIt is included in libxml2\&..SH "OPTIONS".TP\fB\-\-version\fRDisplay the version of libxml2 used\&..TP\fB\-\-debug\fRParse a file and output an annotated tree of the in\-memory version of the document\&..TP\fB\-\-shell\fRRun a navigating shell\&. Details on available commands in shell mode are below\&..TP\fB\-\-debugent\fRDebug the entities defined in the document\&..TP\fB\-\-copy\fRTest the internal copy implementation\&..TP\fB\-\-recover\fROutput any parsable portions of an invalid document\&..TP\fB\-\-noent\fRSubstitute entity values for entity references\&. By default, xmllint leaves entity references in place\&..TP\fB\-\-nocdata\fRSubstitute CDATA section by equivalent text nodes\&..TP\fB\-\-nsclean\fRRemove redundant namespace declarations\&..TP\fB\-\-noout\fRSuppress output\&. By default, xmllint outputs the result tree\&..TP\fB\-\-nonet\fRDo not use the Internet to fetch DTD's or entities\&..TP\fB\-\-nonet\fRDo not use the Internet to fetch DTD's or entities\&..TP\fB\-\-path\fR \fIpaths\fRUse the list (separated by space or column) of filesystem path specified by \fIpaths\fR to load DTDs or entities \&..TP\fB\-\-load\-trace\fRDisplay to stderr all the documents loaded during the processing\&..TP\fB\-\-htmlout\fROutput 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\&..TP\fB\-\-nowrap \fRDo not output HTML doc wrapper\&..TP\fB\-\-valid \fRDetermine 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\&..TP\fB\-\-postvalid\fRValidate after parsing is completed\&..TP\fB\-\-dtdvalid\fR \fIURL\fRUse the DTD specified by \fIURL\fR for validation\&..TP\fB\-\-dtdvalidfpi\fR \fIFPI\fRUse the DTD specified by the Public Identifier \fIFPI\fR for validation, note that this will require a Catalog exporting that Public Identifier to work\&..TP\fB\-\-timing\fROutput information about the time it takes xmllint to perform the various steps\&..TP\fB\-\-output\fR \fIfile\fRDefine a file path where xmllint will save the result of parsing\&. Usually the programs build a tree and save it on stdout, with this option the result XML instance will be saved onto a file\&..TP\fB\-\-repeat\fRRepeat 100 times, for timing or profiling\&..TP\fB\-\-insert\fRTest for valid insertions\&..TP\fB\-\-compress\fRTurn on gzip compression of output\&..TP\fB\-\-html\fRUse the HTML parser\&..TP\fB\-\-xmlout\fRUsed in conjusntion with \fB\-\-html\fR\&. Usually when HTML is parsed the document is saved with the HTML serializer, but with this option the resulting document is saved with the XML serializer\&. This is primarily used to generate XHTML from HTML input\&..TP\fB\-\-push\fRUse the push mode of the parser\&..TP\fB\-\-memory\fRParse from memory\&..TP\fB\-\-maxmem\fR \fInnbytes\fRTest the parser memory support\&. \fInnbytes\fR is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of XML files will not exhaust the virtual memory of the server running them\&..TP\fB\-\-nowarning\fRDo not emit warnings from the parser and/or validator\&..TP\fB\-\-noblanks\fRDrop ignorable blank spaces\&..TP\fB\-\-format\fRReformat and reindent the output\&. The $XMLLINT_INDENT environment variable controls the indentation (default value is two spaces " ")\&..TP\fB\-\-testIO\fRTest user input/output support\&..TP\fB\-\-encode\fR \fIencoding\fROutput in the given encoding\&..TP\fB\-\-catalogs\fRUse the catalogs from $SGML_CATALOG_FILES\&. Otherwise /etc/xml/catalog is used by default\&..TP\fB\-\-nocatalogs\fRDo not use any catalogs\&..TP\fB\-\-auto\fRGenerate a small document for testing purposes\&..TP\fB\-\-xinclude\fRDo XInclude processing\&..TP\fB\-\-noxincludenode\fRDo XInclude processing but do not generate XInclude start and end nodes\&..TP\fB\-\-loaddtd\fRFetch external DTD\&..TP\fB\-\-dtdattr\fRFetch external DTD and populate the tree with inherited attributes\&..TP\fB\-\-dropdtd\fRRemove DTD from output\&..TP\fB\-\-stream\fRUse streaming API \- useful when used in combination with \-\-relaxng or \-\-valid options for validation of files that are too large to be held in memory\&..TP\fB\-\-walker\fRTest the walker module, which is a reader interface but for a document tree, instead of using the reader API on an unparsed document it works on a existing in\-memory tree\&. Used in debugging\&..TP\fB\-\-chkregister\fRTurn on node registration\&. Useful for developers testing libxml2 node tracking code\&..TP\fB\-\-pattern\fR \fIpatternvalue\fRUsed to exercise the pattern recognition engine, which can be used with the reader interface to the parser\&. It allows to select some nodes in the document based on an XPath (subset) expression\&. Used for debugging\&..TP\fB\-\-relaxng\fR \fIschema\fRUse RelaxNG file named \fIschema\fR for validation\&..TP\fB\-\-schema\fR \fIschema\fRUse a W3C XML Schema file named \fIschema\fR for validation\&..TP\fB\-\-c14n\fRUse the W3C XML Canonicalisation (C14N) to serialize the result of parsing to stdout\&. It keeps comments in the result\&..SH "SHELL".PP xmllint offers an interactive shell mode invoked with the \fB\-\-shell\fR command\&. Available commands in shell mode include:.TP\fBbase\fRdisplay XML base of the node.TP\fBbye\fRleave shell.TP\fBcat \fInode\fR\fRDisplay node if given or current node\&..TP\fBcd \fIpath\fR\fRChange the current node to \fIpath\fR (if given and unique) or root if no argument given\&..TP\fBdir \fIpath\fR\fRDumps information about the node (namespace, attributes, content)\&..TP\fBdu \fIpath\fR\fRShow the structure of the subtree under path or the current node\&..TP\fBexit\fRLeave the shell\&..TP\fBhelp\fRShow this help\&..TP\fBfree\fRDisplay memory usage\&..TP\fBload \fIname\fR\fRLoad a new document with the given name\&..TP\fBls \fIpath\fR\fRList contents of \fIpath\fR (if given) or the current directory\&..TP\fBpwd\fRDisplay the path to the current node\&..TP\fBquit\fRLeave the shell\&..TP\fBsave \fIname\fR\fRSaves the current document to \fIname\fR if given or to the original name\&..TP\fBvalidate\fRCheck the document for error\&..TP\fBwrite \fIname\fR\fRWrite the current node to the given filename\&..SH "CATALOGS".PPCatalog behavior can be changed by redirecting queries to the user's own set of catalogs\&. This can be done by setting the \fIXML_CATALOG_FILES\fR environment variable to a list of catalogs\&. An empty one should deactivate loading the default \fI/etc/xml/catalog\fR default catalog\&..SH "DEBUGGING CATALOGS".PPSetting the environment variable \fIXML_DEBUG_CATALOG\fR using the command \fB"export XML_DEBUG_CATALOG="\fR outputs debugging information related to catalog operations\&..SH "ERROR RETURN CODES".PPOn the completion of execution, Xmllint returns the following error codes:.TP0No error.TP1Unclassified.TP2Error in DTD.TP3Validation error.TP4Validation error.TP5Error in schema compilation.TP6Error writing output.TP7Error in pattern (generated when [\-\-pattern] option is used).TP8Error in Reader registration (generated when [\-\-chkregister] option is used).TP9Out of memory error.SH AUTHORSJohn Fleck, Ziying Sherwin, Heiko Rupp.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -