1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>XML Template Functions: LibGlabels 3.0 Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="LibGlabels 3.0 Reference Manual">
8 <link rel="up" href="ch02.html" title="Working Directly With LibGlabels XML">
9 <link rel="prev" href="libglabels-3.0-xml-category.html" title="XML Category Functions">
10 <link rel="next" href="libglabels-3.0-xml-vendor.html" title="XML Vendor Functions">
11 <meta name="generator" content="GTK-Doc V1.24 (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="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18 <a href="#libglabels-3.0-xml-template.description" class="shortcut">Description</a></span>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="libglabels-3.0-xml-category.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="libglabels-3.0-xml-vendor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 <div class="refentry">
26 <a name="libglabels-3.0-xml-template"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
29 <h2><span class="refentrytitle"><a name="libglabels-3.0-xml-template.top_of_page"></a>XML Template Functions</span></h2>
30 <p>XML Template Functions — Functions to create and parse glabels XML template nodes and files</p>
32 <td class="gallery_image" valign="top" align="right"></td>
34 <div class="refsect1">
35 <a name="libglabels-3.0-xml-template.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table width="100%" border="0">
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
43 <td class="function_type">
44 <span class="returnvalue">void</span>
46 <td class="function_name">
47 <a class="link" href="libglabels-3.0-xml-template.html#lgl-xml-template-read-templates-from-file" title="lgl_xml_template_read_templates_from_file ()">lgl_xml_template_read_templates_from_file</a> <span class="c_punctuation">()</span>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
54 <td class="function_name">
55 <a class="link" href="libglabels-3.0-xml-template.html#lgl-xml-template-parse-templates-doc" title="lgl_xml_template_parse_templates_doc ()">lgl_xml_template_parse_templates_doc</a> <span class="c_punctuation">()</span>
59 <td class="function_type">
60 <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="returnvalue">lglTemplate</span></a> *
62 <td class="function_name">
63 <a class="link" href="libglabels-3.0-xml-template.html#lgl-xml-template-parse-template-node" title="lgl_xml_template_parse_template_node ()">lgl_xml_template_parse_template_node</a> <span class="c_punctuation">()</span>
67 <td class="function_type">
68 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
70 <td class="function_name">
71 <a class="link" href="libglabels-3.0-xml-template.html#lgl-xml-template-write-templates-to-file" title="lgl_xml_template_write_templates_to_file ()">lgl_xml_template_write_templates_to_file</a> <span class="c_punctuation">()</span>
75 <td class="function_type">
76 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
78 <td class="function_name">
79 <a class="link" href="libglabels-3.0-xml-template.html#lgl-xml-template-write-template-to-file" title="lgl_xml_template_write_template_to_file ()">lgl_xml_template_write_template_to_file</a> <span class="c_punctuation">()</span>
83 <td class="function_type">
84 <span class="returnvalue">void</span>
86 <td class="function_name">
87 <a class="link" href="libglabels-3.0-xml-template.html#lgl-xml-template-create-template-node" title="lgl_xml_template_create_template_node ()">lgl_xml_template_create_template_node</a> <span class="c_punctuation">()</span>
93 <div class="refsect1">
94 <a name="libglabels-3.0-xml-template.includes"></a><h2>Includes</h2>
95 <pre class="synopsis">#include <libglabels/lgl-xml-templates.h>
98 <div class="refsect1">
99 <a name="libglabels-3.0-xml-template.description"></a><h2>Description</h2>
101 This section describes a number of functions for creating and parsing
102 glabels XML template nodes and files. Template nodes are used in both
103 template files and document files.
106 <div class="refsect1">
107 <a name="libglabels-3.0-xml-template.functions_details"></a><h2>Functions</h2>
108 <div class="refsect2">
109 <a name="lgl-xml-template-read-templates-from-file"></a><h3>lgl_xml_template_read_templates_from_file ()</h3>
110 <pre class="programlisting"><span class="returnvalue">void</span>
111 lgl_xml_template_read_templates_from_file
112 (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *utf8_filename</code></em>);</pre>
113 <p>Read glabels templates from template file.</p>
114 <div class="refsect3">
115 <a name="id-1.3.4.6.2.5"></a><h4>Parameters</h4>
116 <div class="informaltable"><table width="100%" border="0">
118 <col width="150px" class="parameters_name">
119 <col class="parameters_description">
120 <col width="200px" class="parameters_annotations">
123 <td class="parameter_name"><p>utf8_filename</p></td>
124 <td class="parameter_description"><p>Filename of papers file (name encoded as UTF-8)</p></td>
125 <td class="parameter_annotations"> </td>
131 <div class="refsect2">
132 <a name="lgl-xml-template-parse-templates-doc"></a><h3>lgl_xml_template_parse_templates_doc ()</h3>
133 <pre class="programlisting"><span class="returnvalue">void</span>
134 lgl_xml_template_parse_templates_doc (<em class="parameter"><code>const <span class="type">xmlDocPtr</span> templates_doc</code></em>);</pre>
135 <p>Read glabels templates from a libxml <span class="type">xmlDocPtr</span> tree.</p>
136 <div class="refsect3">
137 <a name="id-1.3.4.6.3.5"></a><h4>Parameters</h4>
138 <div class="informaltable"><table width="100%" border="0">
140 <col width="150px" class="parameters_name">
141 <col class="parameters_description">
142 <col width="200px" class="parameters_annotations">
145 <td class="parameter_name"><p>templates_doc</p></td>
146 <td class="parameter_description"><p>libxml <span class="type">xmlDocPtr</span> tree, representing template file.</p></td>
147 <td class="parameter_annotations"> </td>
153 <div class="refsect2">
154 <a name="lgl-xml-template-parse-template-node"></a><h3>lgl_xml_template_parse_template_node ()</h3>
155 <pre class="programlisting"><a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="returnvalue">lglTemplate</span></a> *
156 lgl_xml_template_parse_template_node (<em class="parameter"><code>const <span class="type">xmlNodePtr</span> template_node</code></em>);</pre>
157 <p>Read a single glabels template from a libxml <span class="type">xmlNodePtr</span> node.</p>
158 <div class="refsect3">
159 <a name="id-1.3.4.6.4.5"></a><h4>Parameters</h4>
160 <div class="informaltable"><table width="100%" border="0">
162 <col width="150px" class="parameters_name">
163 <col class="parameters_description">
164 <col width="200px" class="parameters_annotations">
167 <td class="parameter_name"><p>template_node</p></td>
168 <td class="parameter_description"><p>libxml <span class="type">xmlNodePtr</span> template node from a <span class="type">xmlDocPtr</span> tree.</p></td>
169 <td class="parameter_annotations"> </td>
173 <div class="refsect3">
174 <a name="id-1.3.4.6.4.6"></a><h4>Returns</h4>
175 <p> a pointer to a newly created <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> structure.</p>
179 <div class="refsect2">
180 <a name="lgl-xml-template-write-templates-to-file"></a><h3>lgl_xml_template_write_templates_to_file ()</h3>
181 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
182 lgl_xml_template_write_templates_to_file
183 (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *templates</code></em>,
184 <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *utf8_filename</code></em>);</pre>
185 <p>Write a list of <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> structures to a glabels XML template file.</p>
186 <div class="refsect3">
187 <a name="id-1.3.4.6.5.5"></a><h4>Parameters</h4>
188 <div class="informaltable"><table width="100%" border="0">
190 <col width="150px" class="parameters_name">
191 <col class="parameters_description">
192 <col width="200px" class="parameters_annotations">
196 <td class="parameter_name"><p>templates</p></td>
197 <td class="parameter_description"><p>List of <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> structures</p></td>
198 <td class="parameter_annotations"> </td>
201 <td class="parameter_name"><p>utf8_filename</p></td>
202 <td class="parameter_description"><p>Filename of templates file (name encoded as UTF-8)</p></td>
203 <td class="parameter_annotations"> </td>
208 <div class="refsect3">
209 <a name="id-1.3.4.6.5.6"></a><h4>Returns</h4>
210 <p> the number of bytes written or -1 in case of failure</p>
214 <div class="refsect2">
215 <a name="lgl-xml-template-write-template-to-file"></a><h3>lgl_xml_template_write_template_to_file ()</h3>
216 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
217 lgl_xml_template_write_template_to_file
218 (<em class="parameter"><code>const <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> *template</code></em>,
219 <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *utf8_filename</code></em>);</pre>
220 <p>Write a single <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> structures to a glabels XML template file.</p>
221 <div class="refsect3">
222 <a name="id-1.3.4.6.6.5"></a><h4>Parameters</h4>
223 <div class="informaltable"><table width="100%" border="0">
225 <col width="150px" class="parameters_name">
226 <col class="parameters_description">
227 <col width="200px" class="parameters_annotations">
231 <td class="parameter_name"><p>template</p></td>
232 <td class="parameter_description"><p><a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> structure to be written</p></td>
233 <td class="parameter_annotations"> </td>
236 <td class="parameter_name"><p>utf8_filename</p></td>
237 <td class="parameter_description"><p>Filename of templates file (name encoded as UTF-8)</p></td>
238 <td class="parameter_annotations"> </td>
243 <div class="refsect3">
244 <a name="id-1.3.4.6.6.6"></a><h4>Returns</h4>
245 <p> the number of bytes written or -1 in case of failure</p>
249 <div class="refsect2">
250 <a name="lgl-xml-template-create-template-node"></a><h3>lgl_xml_template_create_template_node ()</h3>
251 <pre class="programlisting"><span class="returnvalue">void</span>
252 lgl_xml_template_create_template_node (<em class="parameter"><code>const <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> *template</code></em>,
253 <em class="parameter"><code><span class="type">xmlNodePtr</span> root</code></em>,
254 <em class="parameter"><code>const <span class="type">xmlNsPtr</span> ns</code></em>);</pre>
255 <p>Add a single <a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> child node to given <span class="type">xmlNodePtr</span>.</p>
256 <div class="refsect3">
257 <a name="id-1.3.4.6.7.5"></a><h4>Parameters</h4>
258 <div class="informaltable"><table width="100%" border="0">
260 <col width="150px" class="parameters_name">
261 <col class="parameters_description">
262 <col width="200px" class="parameters_annotations">
266 <td class="parameter_name"><p>template</p></td>
267 <td class="parameter_description"><p><a class="link" href="libglabels-3.0-template.html#lglTemplate" title="struct lglTemplate"><span class="type">lglTemplate</span></a> structure to be written</p></td>
268 <td class="parameter_annotations"> </td>
271 <td class="parameter_name"><p>root</p></td>
272 <td class="parameter_description"><p>parent node to receive new child node</p></td>
273 <td class="parameter_annotations"> </td>
276 <td class="parameter_name"><p>ns</p></td>
277 <td class="parameter_description"><p>a libxml <span class="type">xmlNsPtr</span></p></td>
278 <td class="parameter_annotations"> </td>
285 <div class="refsect1">
286 <a name="libglabels-3.0-xml-template.other_details"></a><h2>Types and Values</h2>
290 <hr>Generated by GTK-Doc V1.24</div>