/usr/share/doc/libtyxml-ocaml-dev/api/Xml.html is in libtyxml-ocaml-doc 3.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="Xhtml.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Xml" rel="Chapter" href="Xml.html">
<link title="Xhtml" rel="Chapter" href="Xhtml.html">
<link title="Svg" rel="Chapter" href="Svg.html">
<link title="Html5" rel="Chapter" href="Html5.html">
<link title="Xml_iter" rel="Chapter" href="Xml_iter.html">
<link title="Xml_sigs" rel="Chapter" href="Xml_sigs.html">
<link title="Xml_wrap" rel="Chapter" href="Xml_wrap.html">
<link title="Xml_print" rel="Chapter" href="Xml_print.html">
<link title="Xhtml_sigs" rel="Chapter" href="Xhtml_sigs.html">
<link title="Xhtml_types" rel="Chapter" href="Xhtml_types.html">
<link title="Xhtml_f" rel="Chapter" href="Xhtml_f.html">
<link title="Svg_sigs" rel="Chapter" href="Svg_sigs.html">
<link title="Svg_types" rel="Chapter" href="Svg_types.html">
<link title="Svg_f" rel="Chapter" href="Svg_f.html">
<link title="Html5_sigs" rel="Chapter" href="Html5_sigs.html">
<link title="Html5_types" rel="Chapter" href="Html5_types.html">
<link title="Html5_f" rel="Chapter" href="Html5_f.html">
<link title="Simplexmlparser" rel="Chapter" href="Simplexmlparser.html">
<link title="Xmllexer" rel="Chapter" href="Xmllexer.html">
<link title="Basic_types" rel="Chapter" href="Basic_types.html">
<link title="Camllexer" rel="Chapter" href="Camllexer.html">
<link title="Xhtmlparser" rel="Chapter" href="Xhtmlparser.html">
<link title="Xhtmlsyntax" rel="Chapter" href="Xhtmlsyntax.html"><link title="Iterators" rel="Section" href="#2_Iterators">
<link title="Printer" rel="Section" href="#2_Printer">
<title>Xml</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<a class="post" href="Xhtml.html" title="Xhtml">Next</a>
</div>
<h1>Module <a href="type_Xml.html">Xml</a></h1>
<pre><span class="keyword">module</span> Xml: <code class="code"><span class="keyword">sig</span></code> <a href="Xml.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><div class="info module top">
Basic functions for construction and manipulation of XML tree.<br>
</div>
<hr width="100%">
<pre><span id="TYPEwrap"><span class="keyword">type</span> <code class="type">'a</code> wrap</span> = <code class="type">'a</code> </pre>
<pre><span id="TYPEuri"><span class="keyword">type</span> <code class="type"></code>uri</span> = <code class="type">string</code> </pre>
<pre><span id="VALstring_of_uri"><span class="keyword">val</span> string_of_uri</span> : <code class="type"><a href="Xml.html#TYPEuri">uri</a> -> string</code></pre>
<pre><span id="VALuri_of_string"><span class="keyword">val</span> uri_of_string</span> : <code class="type">string -> <a href="Xml.html#TYPEuri">uri</a></code></pre>
<pre><span id="TYPEaname"><span class="keyword">type</span> <code class="type"></code>aname</span> = <code class="type">string</code> </pre>
<pre><code><span id="TYPEseparator"><span class="keyword">type</span> <code class="type"></code>separator</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTseparator.Space"><span class="constructor">Space</span></span></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTseparator.Comma"><span class="constructor">Comma</span></span></code></td>
</tr></table>
<pre><span id="TYPEevent_handler"><span class="keyword">type</span> <code class="type"></code>event_handler</span> = <code class="type">string</code> </pre>
<pre><span id="TYPEattrib"><span class="keyword">type</span> <code class="type"></code>attrib</span> </pre>
<pre><span id="VALaname"><span class="keyword">val</span> aname</span> : <code class="type"><a href="Xml.html#TYPEattrib">attrib</a> -> <a href="Xml.html#TYPEaname">aname</a></code></pre>
<pre><code><span id="TYPEacontent"><span class="keyword">type</span> <code class="type"></code>acontent</span> = private </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTacontent.AFloat"><span class="constructor">AFloat</span></span> <span class="keyword">of</span> <code class="type">float</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTacontent.AInt"><span class="constructor">AInt</span></span> <span class="keyword">of</span> <code class="type">int</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTacontent.AStr"><span class="constructor">AStr</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTacontent.AStrL"><span class="constructor">AStrL</span></span> <span class="keyword">of</span> <code class="type"><a href="Xml.html#TYPEseparator">separator</a> * string list</code></code></td>
</tr></table>
<pre><span id="VALacontent"><span class="keyword">val</span> acontent</span> : <code class="type"><a href="Xml.html#TYPEattrib">attrib</a> -> <a href="Xml.html#TYPEacontent">acontent</a></code></pre>
<pre><span id="VALfloat_attrib"><span class="keyword">val</span> float_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> float -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALint_attrib"><span class="keyword">val</span> int_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> int -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALstring_attrib"><span class="keyword">val</span> string_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> string -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALspace_sep_attrib"><span class="keyword">val</span> space_sep_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> string list -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALcomma_sep_attrib"><span class="keyword">val</span> comma_sep_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> string list -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALevent_handler_attrib"><span class="keyword">val</span> event_handler_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> <a href="Xml.html#TYPEevent_handler">event_handler</a> -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALuri_attrib"><span class="keyword">val</span> uri_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> <a href="Xml.html#TYPEuri">uri</a> -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="VALuris_attrib"><span class="keyword">val</span> uris_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> <a href="Xml.html#TYPEuri">uri</a> list -> <a href="Xml.html#TYPEattrib">attrib</a></code></pre>
<pre><span id="TYPEename"><span class="keyword">type</span> <code class="type"></code>ename</span> = <code class="type">string</code> </pre>
<pre><span id="TYPEelt"><span class="keyword">type</span> <code class="type"></code>elt</span> </pre>
<pre><code><span id="TYPEecontent"><span class="keyword">type</span> <code class="type"></code>econtent</span> = private </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.Empty"><span class="constructor">Empty</span></span></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.Comment"><span class="constructor">Comment</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.EncodedPCDATA"><span class="constructor">EncodedPCDATA</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.PCDATA"><span class="constructor">PCDATA</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.Entity"><span class="constructor">Entity</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.Leaf"><span class="constructor">Leaf</span></span> <span class="keyword">of</span> <code class="type"><a href="Xml.html#TYPEename">ename</a> * <a href="Xml.html#TYPEattrib">attrib</a> list</code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTecontent.Node"><span class="constructor">Node</span></span> <span class="keyword">of</span> <code class="type"><a href="Xml.html#TYPEename">ename</a> * <a href="Xml.html#TYPEattrib">attrib</a> list * <a href="Xml.html#TYPEelt">elt</a> list</code></code></td>
</tr></table>
<pre><span id="VALcontent"><span class="keyword">val</span> content</span> : <code class="type"><a href="Xml.html#TYPEelt">elt</a> -> <a href="Xml.html#TYPEecontent">econtent</a></code></pre>
<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type">unit -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALcomment"><span class="keyword">val</span> comment</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALpcdata"><span class="keyword">val</span> pcdata</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALencodedpcdata"><span class="keyword">val</span> encodedpcdata</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALentity"><span class="keyword">val</span> entity</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre><div class="info ">
Neither <code class="code">comment</code>, <code class="code">pcdata</code> nor <code class="code">entity</code> check their argument for invalid
characters. Unsafe characters will be escaped later by the output routines.<br>
</div>
<pre><span id="VALleaf"><span class="keyword">val</span> leaf</span> : <code class="type">?a:<a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALnode"><span class="keyword">val</span> node</span> : <code class="type">?a:<a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEelt">elt</a> list -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALcdata"><span class="keyword">val</span> cdata</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALcdata_script"><span class="keyword">val</span> cdata_script</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre>
<pre><span id="VALcdata_style"><span class="keyword">val</span> cdata_style</span> : <code class="type">string -> <a href="Xml.html#TYPEelt">elt</a></code></pre><br>
<h2 id="2_Iterators">Iterators</h2><br>
<pre><span id="VALamap"><span class="keyword">val</span> amap</span> : <code class="type">(<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list) -> <a href="Xml.html#TYPEelt">elt</a> -> <a href="Xml.html#TYPEelt">elt</a></code></pre><div class="info ">
Recursively edit attributes for the element and all its children.<br>
</div>
<pre><span id="VALamap1"><span class="keyword">val</span> amap1</span> : <code class="type">(<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list) -> <a href="Xml.html#TYPEelt">elt</a> -> <a href="Xml.html#TYPEelt">elt</a></code></pre><div class="info ">
Edit attributes only for one element.<br>
</div>
<br>
The following can safely be exported by higher level libraries,
because removing an attribute from a element is always legal.<br>
<pre><span id="VALrm_attrib"><span class="keyword">val</span> rm_attrib</span> : <code class="type">(<a href="Xml.html#TYPEaname">aname</a> -> bool) -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALrm_attrib_from_list"><span class="keyword">val</span> rm_attrib_from_list</span> : <code class="type">(<a href="Xml.html#TYPEaname">aname</a> -> bool) -> (string -> bool) -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALmap_int_attrib"><span class="keyword">val</span> map_int_attrib</span> : <code class="type">(<a href="Xml.html#TYPEaname">aname</a> -> bool) -> (int -> int) -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALmap_string_attrib"><span class="keyword">val</span> map_string_attrib</span> : <code class="type">(<a href="Xml.html#TYPEaname">aname</a> -> bool) -><br> (string -> string) -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALmap_string_attrib_in_list"><span class="keyword">val</span> map_string_attrib_in_list</span> : <code class="type">(<a href="Xml.html#TYPEaname">aname</a> -> bool) -><br> (string -> string) -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre><br>
Exporting the following by higher level libraries would drive
a hole through a type system, because they allow to add <em>any</em>
attribute to <em>any</em> element.<br>
<pre><span id="VALadd_int_attrib"><span class="keyword">val</span> add_int_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> int -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALadd_string_attrib"><span class="keyword">val</span> add_string_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> string -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALadd_comma_sep_attrib"><span class="keyword">val</span> add_comma_sep_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> string -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALadd_space_sep_attrib"><span class="keyword">val</span> add_space_sep_attrib</span> : <code class="type"><a href="Xml.html#TYPEaname">aname</a> -> string -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEattrib">attrib</a> list</code></pre>
<pre><span id="VALfold"><span class="keyword">val</span> fold</span> : <code class="type">(unit -> 'a) -><br> (string -> 'a) -><br> (string -> 'a) -><br> (string -> 'a) -><br> (string -> 'a) -><br> (<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> 'a) -><br> (<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> 'a list -> 'a) -> <a href="Xml.html#TYPEelt">elt</a> -> 'a</code></pre>
<pre><span id="VALall_entities"><span class="keyword">val</span> all_entities</span> : <code class="type"><a href="Xml.html#TYPEelt">elt</a> -> string list</code></pre>
<pre><span id="VALtranslate"><span class="keyword">val</span> translate</span> : <code class="type">(<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEelt">elt</a>) -><br> (<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEelt">elt</a> list -> <a href="Xml.html#TYPEelt">elt</a>) -><br> ('state -> <a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEelt">elt</a> list) -><br> ('state -> <a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> <a href="Xml.html#TYPEelt">elt</a> list -> <a href="Xml.html#TYPEelt">elt</a> list) -><br> (<a href="Xml.html#TYPEename">ename</a> -> <a href="Xml.html#TYPEattrib">attrib</a> list -> 'state -> 'state) -><br> 'state -> <a href="Xml.html#TYPEelt">elt</a> -> <a href="Xml.html#TYPEelt">elt</a></code></pre><br>
<h2 id="2_Printer">Printer</h2><br>
<pre><span id="VALprint_list"><span class="keyword">val</span> print_list</span> : <code class="type">output:(string -> unit) -> ?encode:(string -> string) -> <a href="Xml.html#TYPEelt">elt</a> list -> unit</code></pre>
<pre><span id="VALprint"><span class="keyword">val</span> print</span> : <code class="type">Format.formatter -> <a href="Xml.html#TYPEelt">elt</a> -> unit</code></pre></body></html>
|