xref: /aosp_15_r20/external/libxml2/doc/devhelp/libxml2-c14n.html (revision 7c5688314b92172186c154356a6374bf7684c3ca)
1*7c568831SAndroid Build Coastguard Worker<html>
2*7c568831SAndroid Build Coastguard Worker<head>
3*7c568831SAndroid Build Coastguard Worker<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4*7c568831SAndroid Build Coastguard Worker<title>c14n: Provide Canonical XML and Exclusive XML Canonicalization</title>
5*7c568831SAndroid Build Coastguard Worker<meta name="generator" content="Libxml2 devhelp stylesheet">
6*7c568831SAndroid Build Coastguard Worker<link rel="start" href="index.html" title="libxml2 Reference Manual">
7*7c568831SAndroid Build Coastguard Worker<link rel="up" href="general.html" title="API">
8*7c568831SAndroid Build Coastguard Worker<link rel="stylesheet" href="style.css" type="text/css">
9*7c568831SAndroid Build Coastguard Worker<link rel="chapter" href="general.html" title="API">
10*7c568831SAndroid Build Coastguard Worker</head>
11*7c568831SAndroid Build Coastguard Worker<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
12*7c568831SAndroid Build Coastguard Worker<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
13*7c568831SAndroid Build Coastguard Worker<td><a accesskey="p" href="libxml2-SAX2.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
14*7c568831SAndroid Build Coastguard Worker<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
15*7c568831SAndroid Build Coastguard Worker<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
16*7c568831SAndroid Build Coastguard Worker<td><a accesskey="n" href="libxml2-catalog.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
17*7c568831SAndroid Build Coastguard Worker<th width="100%" align="center">libxml2 Reference Manual</th>
18*7c568831SAndroid Build Coastguard Worker</tr></table>
19*7c568831SAndroid Build Coastguard Worker<h2><span class="refentrytitle">c14n</span></h2>
20*7c568831SAndroid Build Coastguard Worker<p>c14n - Provide Canonical XML and Exclusive XML Canonicalization</p>
21*7c568831SAndroid Build Coastguard Worker<p>the c14n modules provides a  "Canonical XML" implementation</p>
22*7c568831SAndroid Build Coastguard Worker<p>Author(s): Aleksey Sanin &lt;[email protected]&gt; </p>
23*7c568831SAndroid Build Coastguard Worker<div class="refsynopsisdiv">
24*7c568831SAndroid Build Coastguard Worker<h2>Synopsis</h2>
25*7c568831SAndroid Build Coastguard Worker<pre class="synopsis">typedef enum <a href="#xmlC14NMode">xmlC14NMode</a>;
26*7c568831SAndroid Build Coastguard Workerint	<a href="#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a>		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr);
27*7c568831SAndroid Build Coastguard Workerint	<a href="#xmlC14NDocSave">xmlC14NDocSave</a>			(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 const char * filename, <br>					 int compression);
28*7c568831SAndroid Build Coastguard Workerint	<a href="#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a>		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
29*7c568831SAndroid Build Coastguard Workerint	<a href="#xmlC14NExecute">xmlC14NExecute</a>			(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br>					 void * user_data, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
30*7c568831SAndroid Build Coastguard Workertypedef int <a href="#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a>	(void * user_data, <br>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
31*7c568831SAndroid Build Coastguard Worker</pre>
32*7c568831SAndroid Build Coastguard Worker</div>
33*7c568831SAndroid Build Coastguard Worker<div class="refsect1" lang="en"><h2>Description</h2></div>
34*7c568831SAndroid Build Coastguard Worker<div class="refsect1" lang="en">
35*7c568831SAndroid Build Coastguard Worker<h2>Details</h2>
36*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
37*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
38*7c568831SAndroid Build Coastguard Worker<h3>
39*7c568831SAndroid Build Coastguard Worker<a name="xmlC14NMode">Enum </a>xmlC14NMode</h3>
40*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">enum <a href="#xmlC14NMode">xmlC14NMode</a> {
41*7c568831SAndroid Build Coastguard Worker    <a name="XML_C14N_1_0">XML_C14N_1_0</a> = 0 /* Original C14N 1.0 spec */
42*7c568831SAndroid Build Coastguard Worker    <a name="XML_C14N_EXCLUSIVE_1_0">XML_C14N_EXCLUSIVE_1_0</a> = 1 /* Exclusive C14N 1.0 spec */
43*7c568831SAndroid Build Coastguard Worker    <a name="XML_C14N_1_1">XML_C14N_1_1</a> = 2 /*  C14N 1.1 spec */
44*7c568831SAndroid Build Coastguard Worker};
45*7c568831SAndroid Build Coastguard Worker</pre>
46*7c568831SAndroid Build Coastguard Worker<p></p>
47*7c568831SAndroid Build Coastguard Worker</div>
48*7c568831SAndroid Build Coastguard Worker<hr>
49*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
50*7c568831SAndroid Build Coastguard Worker<h3>
51*7c568831SAndroid Build Coastguard Worker<a name="xmlC14NIsVisibleCallback"></a>Function type xmlC14NIsVisibleCallback</h3>
52*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int	xmlC14NIsVisibleCallback	(void * user_data, <br>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br>
53*7c568831SAndroid Build Coastguard Worker</pre>
54*7c568831SAndroid Build Coastguard Worker<p>Signature for a C14N callback on visible nodes</p>
55*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0">
56*7c568831SAndroid Build Coastguard Worker<col align="left">
57*7c568831SAndroid Build Coastguard Worker<tbody>
58*7c568831SAndroid Build Coastguard Worker<tr>
59*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>user_data</tt></i>:</span></td>
60*7c568831SAndroid Build Coastguard Worker<td>user data</td>
61*7c568831SAndroid Build Coastguard Worker</tr>
62*7c568831SAndroid Build Coastguard Worker<tr>
63*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>node</tt></i>:</span></td>
64*7c568831SAndroid Build Coastguard Worker<td>the current node</td>
65*7c568831SAndroid Build Coastguard Worker</tr>
66*7c568831SAndroid Build Coastguard Worker<tr>
67*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>parent</tt></i>:</span></td>
68*7c568831SAndroid Build Coastguard Worker<td>the parent node</td>
69*7c568831SAndroid Build Coastguard Worker</tr>
70*7c568831SAndroid Build Coastguard Worker<tr>
71*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
72*7c568831SAndroid Build Coastguard Worker<td>1 if the node should be included</td>
73*7c568831SAndroid Build Coastguard Worker</tr>
74*7c568831SAndroid Build Coastguard Worker</tbody>
75*7c568831SAndroid Build Coastguard Worker</table></div>
76*7c568831SAndroid Build Coastguard Worker</div>
77*7c568831SAndroid Build Coastguard Worker<hr>
78*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
79*7c568831SAndroid Build Coastguard Worker<h3>
80*7c568831SAndroid Build Coastguard Worker<a name="xmlC14NDocDumpMemory"></a>xmlC14NDocDumpMemory ()</h3>
81*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int	xmlC14NDocDumpMemory		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr)<br>
82*7c568831SAndroid Build Coastguard Worker</pre>
83*7c568831SAndroid Build Coastguard Worker<p>Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
84*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0">
85*7c568831SAndroid Build Coastguard Worker<col align="left">
86*7c568831SAndroid Build Coastguard Worker<tbody>
87*7c568831SAndroid Build Coastguard Worker<tr>
88*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>doc</tt></i>:</span></td>
89*7c568831SAndroid Build Coastguard Worker<td>the XML document for canonization</td>
90*7c568831SAndroid Build Coastguard Worker</tr>
91*7c568831SAndroid Build Coastguard Worker<tr>
92*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>nodes</tt></i>:</span></td>
93*7c568831SAndroid Build Coastguard Worker<td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td>
94*7c568831SAndroid Build Coastguard Worker</tr>
95*7c568831SAndroid Build Coastguard Worker<tr>
96*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mode</tt></i>:</span></td>
97*7c568831SAndroid Build Coastguard Worker<td>the c14n mode (see @xmlC14NMode)</td>
98*7c568831SAndroid Build Coastguard Worker</tr>
99*7c568831SAndroid Build Coastguard Worker<tr>
100*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td>
101*7c568831SAndroid Build Coastguard Worker<td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td>
102*7c568831SAndroid Build Coastguard Worker</tr>
103*7c568831SAndroid Build Coastguard Worker<tr>
104*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>with_comments</tt></i>:</span></td>
105*7c568831SAndroid Build Coastguard Worker<td>include comments in the result (!=0) or not (==0)</td>
106*7c568831SAndroid Build Coastguard Worker</tr>
107*7c568831SAndroid Build Coastguard Worker<tr>
108*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td>
109*7c568831SAndroid Build Coastguard Worker<td>the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory</td>
110*7c568831SAndroid Build Coastguard Worker</tr>
111*7c568831SAndroid Build Coastguard Worker<tr>
112*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
113*7c568831SAndroid Build Coastguard Worker<td>the number of bytes written on success or a negative value on fail</td>
114*7c568831SAndroid Build Coastguard Worker</tr>
115*7c568831SAndroid Build Coastguard Worker</tbody>
116*7c568831SAndroid Build Coastguard Worker</table></div>
117*7c568831SAndroid Build Coastguard Worker</div>
118*7c568831SAndroid Build Coastguard Worker<hr>
119*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
120*7c568831SAndroid Build Coastguard Worker<h3>
121*7c568831SAndroid Build Coastguard Worker<a name="xmlC14NDocSave"></a>xmlC14NDocSave ()</h3>
122*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int	xmlC14NDocSave			(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 const char * filename, <br>					 int compression)<br>
123*7c568831SAndroid Build Coastguard Worker</pre>
124*7c568831SAndroid Build Coastguard Worker<p>Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
125*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0">
126*7c568831SAndroid Build Coastguard Worker<col align="left">
127*7c568831SAndroid Build Coastguard Worker<tbody>
128*7c568831SAndroid Build Coastguard Worker<tr>
129*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>doc</tt></i>:</span></td>
130*7c568831SAndroid Build Coastguard Worker<td>the XML document for canonization</td>
131*7c568831SAndroid Build Coastguard Worker</tr>
132*7c568831SAndroid Build Coastguard Worker<tr>
133*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>nodes</tt></i>:</span></td>
134*7c568831SAndroid Build Coastguard Worker<td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td>
135*7c568831SAndroid Build Coastguard Worker</tr>
136*7c568831SAndroid Build Coastguard Worker<tr>
137*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mode</tt></i>:</span></td>
138*7c568831SAndroid Build Coastguard Worker<td>the c14n mode (see @xmlC14NMode)</td>
139*7c568831SAndroid Build Coastguard Worker</tr>
140*7c568831SAndroid Build Coastguard Worker<tr>
141*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td>
142*7c568831SAndroid Build Coastguard Worker<td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td>
143*7c568831SAndroid Build Coastguard Worker</tr>
144*7c568831SAndroid Build Coastguard Worker<tr>
145*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>with_comments</tt></i>:</span></td>
146*7c568831SAndroid Build Coastguard Worker<td>include comments in the result (!=0) or not (==0)</td>
147*7c568831SAndroid Build Coastguard Worker</tr>
148*7c568831SAndroid Build Coastguard Worker<tr>
149*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>filename</tt></i>:</span></td>
150*7c568831SAndroid Build Coastguard Worker<td>the filename to store canonical XML image</td>
151*7c568831SAndroid Build Coastguard Worker</tr>
152*7c568831SAndroid Build Coastguard Worker<tr>
153*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>compression</tt></i>:</span></td>
154*7c568831SAndroid Build Coastguard Worker<td>the compression level (zlib required): -1 - libxml default, 0 - uncompressed, &gt;0 - compression level</td>
155*7c568831SAndroid Build Coastguard Worker</tr>
156*7c568831SAndroid Build Coastguard Worker<tr>
157*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
158*7c568831SAndroid Build Coastguard Worker<td>the number of bytes written success or a negative value on fail</td>
159*7c568831SAndroid Build Coastguard Worker</tr>
160*7c568831SAndroid Build Coastguard Worker</tbody>
161*7c568831SAndroid Build Coastguard Worker</table></div>
162*7c568831SAndroid Build Coastguard Worker</div>
163*7c568831SAndroid Build Coastguard Worker<hr>
164*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
165*7c568831SAndroid Build Coastguard Worker<h3>
166*7c568831SAndroid Build Coastguard Worker<a name="xmlC14NDocSaveTo"></a>xmlC14NDocSaveTo ()</h3>
167*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int	xmlC14NDocSaveTo		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br>
168*7c568831SAndroid Build Coastguard Worker</pre>
169*7c568831SAndroid Build Coastguard Worker<p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
170*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0">
171*7c568831SAndroid Build Coastguard Worker<col align="left">
172*7c568831SAndroid Build Coastguard Worker<tbody>
173*7c568831SAndroid Build Coastguard Worker<tr>
174*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>doc</tt></i>:</span></td>
175*7c568831SAndroid Build Coastguard Worker<td>the XML document for canonization</td>
176*7c568831SAndroid Build Coastguard Worker</tr>
177*7c568831SAndroid Build Coastguard Worker<tr>
178*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>nodes</tt></i>:</span></td>
179*7c568831SAndroid Build Coastguard Worker<td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td>
180*7c568831SAndroid Build Coastguard Worker</tr>
181*7c568831SAndroid Build Coastguard Worker<tr>
182*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mode</tt></i>:</span></td>
183*7c568831SAndroid Build Coastguard Worker<td>the c14n mode (see @xmlC14NMode)</td>
184*7c568831SAndroid Build Coastguard Worker</tr>
185*7c568831SAndroid Build Coastguard Worker<tr>
186*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td>
187*7c568831SAndroid Build Coastguard Worker<td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td>
188*7c568831SAndroid Build Coastguard Worker</tr>
189*7c568831SAndroid Build Coastguard Worker<tr>
190*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>with_comments</tt></i>:</span></td>
191*7c568831SAndroid Build Coastguard Worker<td>include comments in the result (!=0) or not (==0)</td>
192*7c568831SAndroid Build Coastguard Worker</tr>
193*7c568831SAndroid Build Coastguard Worker<tr>
194*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>buf</tt></i>:</span></td>
195*7c568831SAndroid Build Coastguard Worker<td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td>
196*7c568831SAndroid Build Coastguard Worker</tr>
197*7c568831SAndroid Build Coastguard Worker<tr>
198*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
199*7c568831SAndroid Build Coastguard Worker<td>non-negative value on success or a negative value on fail</td>
200*7c568831SAndroid Build Coastguard Worker</tr>
201*7c568831SAndroid Build Coastguard Worker</tbody>
202*7c568831SAndroid Build Coastguard Worker</table></div>
203*7c568831SAndroid Build Coastguard Worker</div>
204*7c568831SAndroid Build Coastguard Worker<hr>
205*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en">
206*7c568831SAndroid Build Coastguard Worker<h3>
207*7c568831SAndroid Build Coastguard Worker<a name="xmlC14NExecute"></a>xmlC14NExecute ()</h3>
208*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int	xmlC14NExecute			(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 <a href="libxml2-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br>					 void * user_data, <br>					 int mode, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br>					 int with_comments, <br>					 <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br>
209*7c568831SAndroid Build Coastguard Worker</pre>
210*7c568831SAndroid Build Coastguard Worker<p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
211*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0">
212*7c568831SAndroid Build Coastguard Worker<col align="left">
213*7c568831SAndroid Build Coastguard Worker<tbody>
214*7c568831SAndroid Build Coastguard Worker<tr>
215*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>doc</tt></i>:</span></td>
216*7c568831SAndroid Build Coastguard Worker<td>the XML document for canonization</td>
217*7c568831SAndroid Build Coastguard Worker</tr>
218*7c568831SAndroid Build Coastguard Worker<tr>
219*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>is_visible_callback</tt></i>:</span></td>
220*7c568831SAndroid Build Coastguard Worker<td>the function to use to determine is node visible or not</td>
221*7c568831SAndroid Build Coastguard Worker</tr>
222*7c568831SAndroid Build Coastguard Worker<tr>
223*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>user_data</tt></i>:</span></td>
224*7c568831SAndroid Build Coastguard Worker<td>the first parameter for @is_visible_callback function (in most cases, it is nodes set)</td>
225*7c568831SAndroid Build Coastguard Worker</tr>
226*7c568831SAndroid Build Coastguard Worker<tr>
227*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mode</tt></i>:</span></td>
228*7c568831SAndroid Build Coastguard Worker<td>the c14n mode (see @xmlC14NMode)</td>
229*7c568831SAndroid Build Coastguard Worker</tr>
230*7c568831SAndroid Build Coastguard Worker<tr>
231*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td>
232*7c568831SAndroid Build Coastguard Worker<td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td>
233*7c568831SAndroid Build Coastguard Worker</tr>
234*7c568831SAndroid Build Coastguard Worker<tr>
235*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>with_comments</tt></i>:</span></td>
236*7c568831SAndroid Build Coastguard Worker<td>include comments in the result (!=0) or not (==0)</td>
237*7c568831SAndroid Build Coastguard Worker</tr>
238*7c568831SAndroid Build Coastguard Worker<tr>
239*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>buf</tt></i>:</span></td>
240*7c568831SAndroid Build Coastguard Worker<td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td>
241*7c568831SAndroid Build Coastguard Worker</tr>
242*7c568831SAndroid Build Coastguard Worker<tr>
243*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
244*7c568831SAndroid Build Coastguard Worker<td>non-negative value on success or a negative value on fail</td>
245*7c568831SAndroid Build Coastguard Worker</tr>
246*7c568831SAndroid Build Coastguard Worker</tbody>
247*7c568831SAndroid Build Coastguard Worker</table></div>
248*7c568831SAndroid Build Coastguard Worker</div>
249*7c568831SAndroid Build Coastguard Worker<hr>
250*7c568831SAndroid Build Coastguard Worker</div>
251*7c568831SAndroid Build Coastguard Worker</div>
252*7c568831SAndroid Build Coastguard Worker</body>
253*7c568831SAndroid Build Coastguard Worker</html>
254