1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="IBus Reference Manual">
8 <link rel="up" href="ch04.html" title="Configuration">
9 <link rel="prev" href="ibus-ibusversion.html" title="ibusversion">
10 <link rel="next" href="ch05.html" title="Communication">
11 <meta name="generator" content="GTK-Doc V1.19 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="ibus-ibusversion.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">IBus Reference Manual</th>
21 <td><a accesskey="n" href="ch05.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#ibus-ibusxml.synopsis" class="shortcut">Top</a>
26 <a href="#ibus-ibusxml.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="ibus-ibusxml"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="ibus-ibusxml.top_of_page"></a>ibusxml</span></h2>
34 <p>ibusxml — XML handling functions for IBus.</p>
36 <td valign="top" align="right"></td>
38 <div class="refsect1">
39 <a name="ibus-ibusxml.stability-level"></a><h2>Stability Level</h2>
40 Stable, unless otherwise indicated
42 <div class="refsynopsisdiv">
43 <a name="ibus-ibusxml.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis"> <a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode">XMLNode</a>;
45 <a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="returnvalue">XMLNode</span></a> * <a class="link" href="ibus-ibusxml.html#ibus-xml-parse-file" title="ibus_xml_parse_file ()">ibus_xml_parse_file</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
46 <a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="returnvalue">XMLNode</span></a> * <a class="link" href="ibus-ibusxml.html#ibus-xml-parse-buffer" title="ibus_xml_parse_buffer ()">ibus_xml_parse_buffer</a> (<em class="parameter"><code>const <span class="type">gchar</span> *buffer</code></em>);
47 <span class="returnvalue">void</span> <a class="link" href="ibus-ibusxml.html#ibus-xml-free" title="ibus_xml_free ()">ibus_xml_free</a> (<em class="parameter"><code><a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="type">XMLNode</span></a> *node</code></em>);
48 <span class="returnvalue">void</span> <a class="link" href="ibus-ibusxml.html#ibus-xml-output" title="ibus_xml_output ()">ibus_xml_output</a> (<em class="parameter"><code>const <a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="type">XMLNode</span></a> *node</code></em>,
49 <em class="parameter"><code><span class="type">GString</span> *output</code></em>);
52 <div class="refsect1">
53 <a name="ibus-ibusxml.description"></a><h2>Description</h2>
55 IBusXML lists data structure and handling function for XML in IBus.
58 <div class="refsect1">
59 <a name="ibus-ibusxml.details"></a><h2>Details</h2>
60 <div class="refsect2">
61 <a name="XMLNode"></a><h3>XMLNode</h3>
62 <pre class="programlisting">typedef struct {
70 A data type representing an XML nod.
72 <div class="variablelist"><table border="0" class="variablelist">
74 <col align="left" valign="top">
79 <td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="XMLNode.name"></a>name</code></em>;</span></p></td>
80 <td>Name of XML tag.</td>
83 <td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="XMLNode.text"></a>text</code></em>;</span></p></td>
84 <td>Text enclosed by XML start tag and end tag. i.e. <code class="sgmltag-element">text</code>.</td>
87 <td><p><span class="term"><span class="type">gchar</span> **<em class="structfield"><code><a name="XMLNode.attributes"></a>attributes</code></em>;</span></p></td>
88 <td>Attributes of the XML node.</td>
91 <td><p><span class="term"><span class="type">GList</span> *<em class="structfield"><code><a name="XMLNode.sub-nodes"></a>sub_nodes</code></em>;</span></p></td>
92 <td>Children node of this XML node.</td>
98 <div class="refsect2">
99 <a name="ibus-xml-parse-file"></a><h3>ibus_xml_parse_file ()</h3>
100 <pre class="programlisting"><a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="returnvalue">XMLNode</span></a> * ibus_xml_parse_file (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
102 Parse an XML file and return a corresponding XML tree.
104 <div class="variablelist"><table border="0" class="variablelist">
106 <col align="left" valign="top">
111 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
112 <td>File name to be parsed.</td>
115 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
116 <td>Root node of parsed XML tree.</td>
122 <div class="refsect2">
123 <a name="ibus-xml-parse-buffer"></a><h3>ibus_xml_parse_buffer ()</h3>
124 <pre class="programlisting"><a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="returnvalue">XMLNode</span></a> * ibus_xml_parse_buffer (<em class="parameter"><code>const <span class="type">gchar</span> *buffer</code></em>);</pre>
126 Parse a string buffer which contains an XML-formatted string,
127 and return a corresponding XML tree.
129 <div class="variablelist"><table border="0" class="variablelist">
131 <col align="left" valign="top">
136 <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
137 <td>Buffer to be parsed.</td>
140 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
141 <td>Root node of parsed XML tree.</td>
147 <div class="refsect2">
148 <a name="ibus-xml-free"></a><h3>ibus_xml_free ()</h3>
149 <pre class="programlisting"><span class="returnvalue">void</span> ibus_xml_free (<em class="parameter"><code><a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="type">XMLNode</span></a> *node</code></em>);</pre>
153 <div class="variablelist"><table border="0" class="variablelist">
155 <col align="left" valign="top">
159 <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
160 <td>Root node of an XML tree.</td>
165 <div class="refsect2">
166 <a name="ibus-xml-output"></a><h3>ibus_xml_output ()</h3>
167 <pre class="programlisting"><span class="returnvalue">void</span> ibus_xml_output (<em class="parameter"><code>const <a class="link" href="ibus-ibusxml.html#XMLNode" title="XMLNode"><span class="type">XMLNode</span></a> *node</code></em>,
168 <em class="parameter"><code><span class="type">GString</span> *output</code></em>);</pre>
170 Output an XML tree to a GString.
172 <div class="variablelist"><table border="0" class="variablelist">
174 <col align="left" valign="top">
179 <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
180 <td>Root node of an XML tree.</td>
183 <td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
184 <td>GString which stores the output.</td>
193 Generated by GTK-Doc V1.19</div>