📄 xmllint.xml
字号:
<varlistentry> <term><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></term> <listitem> <para> Used 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. </para> </listitem> </varlistentry> <varlistentry> <term><option>--postvalid</option></term> <listitem> <para>Validate after parsing has completed.</para> </listitem> </varlistentry> <varlistentry> <term><option>--push</option></term> <listitem> <para>Use the push mode of the parser.</para> </listitem> </varlistentry> <varlistentry> <term><option>--recover</option></term> <listitem> <para>Output any parsable portions of an invalid document.</para> </listitem> </varlistentry> <varlistentry> <term><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></term> <listitem> <para> Use RelaxNG file named <replaceable class="option">SCHEMA</replaceable> for validation. </para> </listitem> </varlistentry> <varlistentry> <term><option>--repeat</option></term> <listitem> <para>Repeat 100 times, for timing or profiling.</para> </listitem> </varlistentry> <varlistentry> <term><option>--schema <replaceable>SCHEMA</replaceable></option></term> <listitem> <para> Use a W3C <acronym>XML</acronym> Schema file named <replaceable>SCHEMA</replaceable> for validation. </para> </listitem> </varlistentry> <varlistentry> <term><option>--shell</option></term> <listitem> <para> Run a navigating shell. Details on available commands in shell mode are below (see <xref linkend="shell"/>). </para> </listitem> </varlistentry> <varlistentry> <term><option>--stream</option></term> <listitem> <para> Use streaming <acronym>API</acronym> - useful when used in combination with <option>--relaxng</option> or <option>--valid</option> options for validation of files that are too large to be held in memory. </para> </listitem> </varlistentry> <varlistentry> <term><option>--testIO</option></term> <listitem> <para>Test user input/output support.</para> </listitem> </varlistentry> <varlistentry> <term><option>--timing</option></term> <listitem> <para> Output information about the time it takes &xmllint; to perform the various steps. </para> </listitem> </varlistentry> <varlistentry> <term><option>--valid</option></term> <listitem> <para> Determine if the document is a valid instance of the included Document Type Definition (<acronym>DTD</acronym>). A <acronym>DTD</acronym> to be validated against also can be specified at the command line using the <option>--dtdvalid</option> option. By default, &xmllint; also checks to determine if the document is well-formed. </para> </listitem> </varlistentry> <varlistentry> <term><option>--version</option></term> <listitem> <para> Display the version of <citerefentry> <refentrytitle>libxml</refentrytitle> <manvolnum>3</manvolnum> </citerefentry> used. </para> </listitem> </varlistentry> <varlistentry> <term><option>--walker</option></term> <listitem> <para> Test the walker module, which is a reader interface but for a document tree, instead of using the reader <acronym>API</acronym> on an unparsed document it works on an existing in-memory tree. Used for debugging. </para> </listitem> </varlistentry> <varlistentry> <term><option>--xinclude</option></term> <listitem> <para>Do XInclude processing.</para> </listitem> </varlistentry> <varlistentry> <term><option>--xmlout</option></term> <listitem> <para> Used in conjunction with <option>--html</option>. Usually when <acronym>HTML</acronym> is parsed the document is saved with the <acronym>HTML</acronym> serializer. But with this option the resulting document is saved with the <acronym>XML</acronym> serializer. This is primarily used to generate <acronym>XHTML</acronym> from <acronym>HTML</acronym> input. </para> </listitem> </varlistentry> </variablelist></refsect1><refsect1 id="shell"> <title>SHELL COMMANDS</title> <para> &xmllint; offers an interactive shell mode invoked with the <option>--shell</option> command. Available commands in shell mode include (in alphabetical order): </para> <variablelist> <varlistentry> <term><command>base</command></term> <listitem> <para>Display <acronym>XML</acronym> base of the node.</para> </listitem> </varlistentry> <varlistentry> <term><command>bye</command></term> <listitem> <para>Leave the shell.</para> </listitem> </varlistentry> <varlistentry> <term><command>cat <replaceable>NODE</replaceable></command></term> <listitem> <para>Display the given node or the current one.</para> </listitem> </varlistentry> <varlistentry> <term><command>cd <replaceable>PATH</replaceable></command></term> <listitem> <para> Change the current node to the given path (if unique) or root if no argument is given. </para> </listitem> </varlistentry> <varlistentry> <term><command>dir <replaceable>PATH</replaceable></command></term> <listitem> <para> Dumps information about the node (namespace, attributes, content). </para> </listitem> </varlistentry> <varlistentry> <term><command>du <replaceable>PATH</replaceable></command></term> <listitem> <para> Show the structure of the subtree under the given path or the current node. </para> </listitem> </varlistentry> <varlistentry> <term><command>exit</command></term> <listitem> <para>Leave the shell.</para> </listitem> </varlistentry> <varlistentry> <term><command>help</command></term> <listitem> <para>Show this help.</para> </listitem> </varlistentry> <varlistentry> <term><command>free</command></term> <listitem> <para>Display memory usage.</para> </listitem> </varlistentry> <varlistentry> <term><command>load <replaceable>FILENAME</replaceable></command></term> <listitem> <para>Load a new document with the given filename.</para> </listitem> </varlistentry> <varlistentry> <term><command>ls <replaceable>PATH</replaceable></command></term> <listitem> <para>List contents of the given path or the current directory.</para> </listitem> </varlistentry> <varlistentry> <term><command>pwd</command></term> <listitem> <para>Display the path to the current node.</para> </listitem> </varlistentry> <varlistentry> <term><command>quit</command></term> <listitem> <para>Leave the shell.</para> </listitem> </varlistentry> <varlistentry> <term><command>save <replaceable>FILENAME</replaceable></command></term> <listitem> <para> Save the current document to the given filename or to the original name. </para> </listitem> </varlistentry> <varlistentry> <term><option>validate</option></term> <listitem> <para>Check the document for errors.</para> </listitem> </varlistentry> <varlistentry> <term><command>write <replaceable>FILENAME</replaceable></command></term> <listitem> <para>Write the current node to the given filename.</para> </listitem> </varlistentry> </variablelist></refsect1><refsect1 id="environment"> <title>ENVIRONMENT</title> <variablelist> <varlistentry> <term><envar>SGML_CATALOG_FILES</envar></term> <listitem> <para><acronym>SGML</acronym> catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the <envar>SGML_CATALOG_FILES</envar> environment variable to a list of catalogs. An empty one should deactivate loading the default <filename>/etc/sgml/catalog</filename> catalog. </para> </listitem> </varlistentry> <varlistentry> <term><envar>XML_CATALOG_FILES</envar></term> <listitem> <para><acronym>XML</acronym> catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the <envar>XML_CATALOG_FILES</envar> environment variable to a list of catalogs. An empty one should deactivate loading the default <filename>/etc/xml/catalog</filename> catalog. </para> </listitem> </varlistentry> <varlistentry> <term><envar>XML_DEBUG_CATALOG</envar></term> <listitem> <para>Setting the environment variable <envar>XML_DEBUG_CATALOG</envar> to <parameter>non-zero</parameter> using the <command>export</command> command outputs debugging information related to catalog operations. </para> </listitem> </varlistentry> <varlistentry> <term><envar>XMLLINT_INDENT</envar></term> <listitem> <para>Setting the environment variable <envar>XMLLINT_INDENT</envar> controls the indentation. The default value is two spaces " ". </para> </listitem> </varlistentry> </variablelist></refsect1><refsect1 id="diagnostics"> <title>DIAGNOSTICS</title> <para> &xmllint; return codes provide information that can be used when calling it from scripts. </para> <!-- better use segmentedlist element later, which is currently only supported in snapshots --> <variablelist> <varlistentry> <term><errorcode>0</errorcode></term> <listitem> <para>No error</para> </listitem> </varlistentry> <varlistentry> <term><errorcode>1</errorcode></term> <listitem> <para>Unclassified</para> </listitem> </varlistentry> <varlistentry> <term><errorcode>2</errorcode></term> <listitem> <para>Error in <acronym>DTD</acronym></para> </listitem> </varlistentry> <varlistentry> <term><errorcode>3</errorcode></term> <listitem> <para>Validation error</para> </listitem> </varlistentry> <varlistentry> <term><errorcode>4</errorcode></term> <listitem> <para>Validation error</para> </listitem> </varlistentry> <varlistentry> <term><errorcode>5</errorcode></term> <listitem> <para>Error in schema compilation</para> </listitem> </varlistentry> <varlistentry> <term><errorcode>6</errorcode></term> <listitem> <para>Error writing output</para> </listitem> </varlistentry> <varlistentry> <term><errorcode>7</errorcode></term> <listitem> <para> Error in pattern (generated when <option>--pattern</option> option is used) </para> </listitem> </varlistentry> <varlistentry> <term><errorcode>8</errorcode></term> <listitem> <para> Error in Reader registration (generated when <option>--chkregister</option> option is used) </para> </listitem> </varlistentry> <varlistentry> <term><errorcode>9</errorcode></term> <listitem> <para>Out of memory error</para> </listitem> </varlistentry> </variablelist></refsect1><refsect1 id="seealso"> <title>SEE ALSO</title> <para><citerefentry> <refentrytitle>libxml</refentrytitle> <manvolnum>3</manvolnum> </citerefentry> </para> <para> More information can be found at <itemizedlist> <listitem> <para><citerefentry> <refentrytitle>libxml</refentrytitle> <manvolnum>3</manvolnum> </citerefentry> web page <ulink url="http://www.xmlsoft.org/"/> </para> </listitem> <listitem> <para>W3C <acronym>XSLT</acronym> page <ulink url="http://www.w3.org/TR/xslt"/> </para> </listitem> </itemizedlist> </para></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -