VirtualBox

source: vbox/trunk/src/libs/libxml2-2.9.4/doc/devhelp/libxml2-debugXML.html@ 71916

Last change on this file since 71916 was 65950, checked in by vboxsync, 8 years ago

libxml 2.9.4: fix export

  • Property svn:eol-style set to native
File size: 32.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5 <title>debugXML: Tree debugging APIs</title>
6 <meta name="generator" content="Libxml2 devhelp stylesheet"/>
7 <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
8 <link rel="up" href="general.html" title="API"/>
9 <link rel="stylesheet" href="style.css" type="text/css"/>
10 <link rel="chapter" href="general.html" title="API"/>
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
14 <tr valign="middle">
15 <td>
16 <a accesskey="p" href="libxml2-chvalid.html">
17 <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
18 </a>
19 </td>
20 <td>
21 <a accesskey="u" href="general.html">
22 <img src="up.png" width="24" height="24" border="0" alt="Up"/>
23 </a>
24 </td>
25 <td>
26 <a accesskey="h" href="index.html">
27 <img src="home.png" width="24" height="24" border="0" alt="Home"/>
28 </a>
29 </td>
30 <td>
31 <a accesskey="n" href="libxml2-dict.html">
32 <img src="right.png" width="24" height="24" border="0" alt="Next"/>
33 </a>
34 </td>
35 <th width="100%" align="center">libxml2 Reference Manual</th>
36 </tr>
37 </table>
38 <h2>
39 <span class="refentrytitle">debugXML</span>
40 </h2>
41 <p>debugXML - Tree debugging APIs</p>
42 <p>Interfaces to a set of routines used for debugging the tree produced by the XML parser. </p>
43 <p>Author(s): Daniel Veillard </p>
44 <div class="refsynopsisdiv">
45 <h2>Synopsis</h2>
46 <pre class="synopsis">typedef struct _xmlShellCtxt <a href="#xmlShellCtxt">xmlShellCtxt</a>;
47typedef <a href="libxml2-debugXML.html#xmlShellCtxt">xmlShellCtxt</a> * <a href="#xmlShellCtxtPtr">xmlShellCtxtPtr</a>;
48void <a href="#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth);
49void <a href="#xmlLsOneNode">xmlLsOneNode</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
50typedef char * <a href="#xmlShellReadlineFunc">xmlShellReadlineFunc</a> (char * prompt);
51int <a href="#xmlShellSave">xmlShellSave</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
52const char * <a href="#xmlBoolToText">xmlBoolToText</a> (int boolval);
53int <a href="#xmlShellWrite">xmlShellWrite</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
54int <a href="#xmlShellDu">xmlShellDu</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
55int <a href="#xmlShellValidate">xmlShellValidate</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * dtd, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
56int <a href="#xmlDebugCheckDocument">xmlDebugCheckDocument</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
57void <a href="#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> list);
58typedef int <a href="#xmlShellCmd">xmlShellCmd</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
59int <a href="#xmlShellLoad">xmlShellLoad</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
60void <a href="#xmlDebugDumpString">xmlDebugDumpString</a> (FILE * output, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
61int <a href="#xmlShellBase">xmlShellBase</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
62int <a href="#xmlShellCat">xmlShellCat</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
63void <a href="#xmlDebugDumpDTD">xmlDebugDumpDTD</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
64void <a href="#xmlDebugDumpNode">xmlDebugDumpNode</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth);
65void <a href="#xmlDebugDumpEntities">xmlDebugDumpEntities</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
66void <a href="#xmlShellPrintNode">xmlShellPrintNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
67int <a href="#xmlShellPwd">xmlShellPwd</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * buffer, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
68void <a href="#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth);
69void <a href="#xmlDebugDumpAttr">xmlDebugDumpAttr</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth);
70void <a href="#xmlDebugDumpDocument">xmlDebugDumpDocument</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
71int <a href="#xmlLsCountNode">xmlLsCountNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
72void <a href="#xmlShellPrintXPathError">xmlShellPrintXPathError</a> (int errorType, <br/> const char * arg);
73int <a href="#xmlShellDir">xmlShellDir</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
74void <a href="#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth);
75int <a href="#xmlShellList">xmlShellList</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
76void <a href="#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
77void <a href="#xmlShell">xmlShell</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> char * filename, <br/> <a href="libxml2-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input, <br/> FILE * output);
78</pre>
79 </div>
80 <div class="refsect1" lang="en">
81 <h2>Description</h2>
82 </div>
83 <div class="refsect1" lang="en">
84 <h2>Details</h2>
85 <div class="refsect2" lang="en">
86 <div class="refsect2" lang="en"><h3><a name="xmlShellCtxt">Structure </a>xmlShellCtxt</h3><pre class="programlisting">struct _xmlShellCtxt {
87 char * filename
88 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc
89 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
90 <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> pctxt
91 int loaded
92 FILE * output
93 <a href="libxml2-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input
94} xmlShellCtxt;
95</pre><p/>
96</div>
97 <hr/>
98 <div class="refsect2" lang="en"><h3><a name="xmlShellCtxtPtr">Typedef </a>xmlShellCtxtPtr</h3><pre class="programlisting"><a href="libxml2-debugXML.html#xmlShellCtxt">xmlShellCtxt</a> * xmlShellCtxtPtr;
99</pre><p/>
100</div>
101 <hr/>
102 <div class="refsect2" lang="en"><h3><a name="xmlShellCmd"/>Function type xmlShellCmd</h3><pre class="programlisting">int xmlShellCmd (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
103</pre><p>This is a generic signature for the XML shell functions.</p>
104<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a string argument</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a first node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>a second node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int, negative returns indicating errors.</td></tr></tbody></table></div></div>
105 <hr/>
106 <div class="refsect2" lang="en"><h3><a name="xmlShellReadlineFunc"/>Function type xmlShellReadlineFunc</h3><pre class="programlisting">char * xmlShellReadlineFunc (char * prompt)<br/>
107</pre><p>This is a generic signature for the XML shell input function.</p>
108<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prompt</tt></i>:</span></td><td>a string prompt</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string which will be freed by the Shell.</td></tr></tbody></table></div></div>
109 <hr/>
110 <div class="refsect2" lang="en"><h3><a name="xmlBoolToText"/>xmlBoolToText ()</h3><pre class="programlisting">const char * xmlBoolToText (int boolval)<br/>
111</pre><p>Convenient way to turn bool into text</p>
112<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>boolval</tt></i>:</span></td><td>a bool to turn into text</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to either "True" or "False"</td></tr></tbody></table></div></div>
113 <hr/>
114 <div class="refsect2" lang="en"><h3><a name="xmlDebugCheckDocument"/>xmlDebugCheckDocument ()</h3><pre class="programlisting">int xmlDebugCheckDocument (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
115</pre><p>Check the document for potential content problems, and output the errors to @output</p>
116<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of errors found</td></tr></tbody></table></div></div>
117 <hr/>
118 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpAttr"/>xmlDebugDumpAttr ()</h3><pre class="programlisting">void xmlDebugDumpAttr (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth)<br/>
119</pre><p>Dumps debug information for the <a href="libxml2-SAX.html#attribute">attribute</a></p>
120<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
121 <hr/>
122 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpAttrList"/>xmlDebugDumpAttrList ()</h3><pre class="programlisting">void xmlDebugDumpAttrList (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth)<br/>
123</pre><p>Dumps debug information for the <a href="libxml2-SAX.html#attribute">attribute</a> list</p>
124<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> list</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
125 <hr/>
126 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpDTD"/>xmlDebugDumpDTD ()</h3><pre class="programlisting">void xmlDebugDumpDTD (FILE * output, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br/>
127</pre><p>Dumps debug information for the DTD</p>
128<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the DTD</td></tr></tbody></table></div></div>
129 <hr/>
130 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpDocument"/>xmlDebugDumpDocument ()</h3><pre class="programlisting">void xmlDebugDumpDocument (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
131</pre><p>Dumps debug information for the document, it's recursive</p>
132<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
133 <hr/>
134 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpDocumentHead"/>xmlDebugDumpDocumentHead ()</h3><pre class="programlisting">void xmlDebugDumpDocumentHead (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
135</pre><p>Dumps debug information cncerning the document, not recursive</p>
136<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
137 <hr/>
138 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpEntities"/>xmlDebugDumpEntities ()</h3><pre class="programlisting">void xmlDebugDumpEntities (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
139</pre><p>Dumps debug information for all the entities in use by the document</p>
140<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
141 <hr/>
142 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpNode"/>xmlDebugDumpNode ()</h3><pre class="programlisting">void xmlDebugDumpNode (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth)<br/>
143</pre><p>Dumps debug information for the element node, it is recursive</p>
144<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
145 <hr/>
146 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpNodeList"/>xmlDebugDumpNodeList ()</h3><pre class="programlisting">void xmlDebugDumpNodeList (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth)<br/>
147</pre><p>Dumps debug information for the list of element node, it is recursive</p>
148<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node list</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
149 <hr/>
150 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpOneNode"/>xmlDebugDumpOneNode ()</h3><pre class="programlisting">void xmlDebugDumpOneNode (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth)<br/>
151</pre><p>Dumps debug information for the element node, it is not recursive</p>
152<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
153 <hr/>
154 <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpString"/>xmlDebugDumpString ()</h3><pre class="programlisting">void xmlDebugDumpString (FILE * output, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
155</pre><p>Dumps informations about the string, shorten it if necessary</p>
156<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr></tbody></table></div></div>
157 <hr/>
158 <div class="refsect2" lang="en"><h3><a name="xmlLsCountNode"/>xmlLsCountNode ()</h3><pre class="programlisting">int xmlLsCountNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
159</pre><p>Count the children of @node.</p>
160<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to count</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of children of @node.</td></tr></tbody></table></div></div>
161 <hr/>
162 <div class="refsect2" lang="en"><h3><a name="xmlLsOneNode"/>xmlLsOneNode ()</h3><pre class="programlisting">void xmlLsOneNode (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
163</pre><p>Dump to @output the type and name of @node.</p>
164<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to dump</td></tr></tbody></table></div></div>
165 <hr/>
166 <div class="refsect2" lang="en"><h3><a name="xmlShell"/>xmlShell ()</h3><pre class="programlisting">void xmlShell (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> char * filename, <br/> <a href="libxml2-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input, <br/> FILE * output)<br/>
167</pre><p>Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline.</p>
168<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the initial document</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the output buffer</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the line reading function</td></tr><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the output FILE*, defaults to stdout if NULL</td></tr></tbody></table></div></div>
169 <hr/>
170 <div class="refsect2" lang="en"><h3><a name="xmlShellBase"/>xmlShellBase ()</h3><pre class="programlisting">int xmlShellBase (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
171</pre><p>Implements the XML shell function "base" dumps the current XML base of the node</p>
172<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
173 <hr/>
174 <div class="refsect2" lang="en"><h3><a name="xmlShellCat"/>xmlShellCat ()</h3><pre class="programlisting">int xmlShellCat (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
175</pre><p>Implements the XML shell function "cat" dumps the serialization node content (XML or HTML).</p>
176<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
177 <hr/>
178 <div class="refsect2" lang="en"><h3><a name="xmlShellDir"/>xmlShellDir ()</h3><pre class="programlisting">int xmlShellDir (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
179</pre><p>Implements the XML shell function "dir" dumps informations about the node (namespace, attributes, content).</p>
180<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
181 <hr/>
182 <div class="refsect2" lang="en"><h3><a name="xmlShellDu"/>xmlShellDu ()</h3><pre class="programlisting">int xmlShellDu (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
183</pre><p>Implements the XML shell function "du" show the structure of the subtree under node @tree If @tree is null, the command works on the current node.</p>
184<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node defining a subtree</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
185 <hr/>
186 <div class="refsect2" lang="en"><h3><a name="xmlShellList"/>xmlShellList ()</h3><pre class="programlisting">int xmlShellList (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
187</pre><p>Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory)</p>
188<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
189 <hr/>
190 <div class="refsect2" lang="en"><h3><a name="xmlShellLoad"/>xmlShellLoad ()</h3><pre class="programlisting">int xmlShellLoad (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
191</pre><p>Implements the XML shell function "load" loads a new document specified by the filename</p>
192<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 if loading failed</td></tr></tbody></table></div></div>
193 <hr/>
194 <div class="refsect2" lang="en"><h3><a name="xmlShellPrintNode"/>xmlShellPrintNode ()</h3><pre class="programlisting">void xmlShellPrintNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
195</pre><p>Print node to the output FILE</p>
196<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a non-null node to print to the output FILE</td></tr></tbody></table></div></div>
197 <hr/>
198 <div class="refsect2" lang="en"><h3><a name="xmlShellPrintXPathError"/>xmlShellPrintXPathError ()</h3><pre class="programlisting">void xmlShellPrintXPathError (int errorType, <br/> const char * arg)<br/>
199</pre><p>Print the xpath error to libxml default error channel</p>
200<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>errorType</tt></i>:</span></td><td>valid xpath error id</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>the argument that cause xpath to fail</td></tr></tbody></table></div></div>
201 <hr/>
202 <div class="refsect2" lang="en"><h3><a name="xmlShellPrintXPathResult"/>xmlShellPrintXPathResult ()</h3><pre class="programlisting">void xmlShellPrintXPathResult (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> list)<br/>
203</pre><p>Prints result to the output FILE</p>
204<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a valid result generated by an xpath evaluation</td></tr></tbody></table></div></div>
205 <hr/>
206 <div class="refsect2" lang="en"><h3><a name="xmlShellPwd"/>xmlShellPwd ()</h3><pre class="programlisting">int xmlShellPwd (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * buffer, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
207</pre><p>Implements the XML shell function "pwd" Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands.</p>
208<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the output buffer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
209 <hr/>
210 <div class="refsect2" lang="en"><h3><a name="xmlShellSave"/>xmlShellSave ()</h3><pre class="programlisting">int xmlShellSave (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
211</pre><p>Implements the XML shell function "save" Write the current document to the filename, or it's original name</p>
212<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name (optional)</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
213 <hr/>
214 <div class="refsect2" lang="en"><h3><a name="xmlShellValidate"/>xmlShellValidate ()</h3><pre class="programlisting">int xmlShellValidate (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * dtd, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
215</pre><p>Implements the XML shell function "validate" Validate the document, if a DTD path is provided, then the validation is done against the given DTD.</p>
216<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the DTD URI (optional)</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
217 <hr/>
218 <div class="refsect2" lang="en"><h3><a name="xmlShellWrite"/>xmlShellWrite ()</h3><pre class="programlisting">int xmlShellWrite (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
219</pre><p>Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the @node specified</p>
220<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in the tree</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
221 <hr/>
222 </div>
223 </div>
224 </body>
225</html>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette