]> git.sur5r.net Git - glabels/blob - docs/libglabels/html/libglabels-3.0-xml.html
Imported Upstream version 3.4.0
[glabels] / docs / libglabels / html / libglabels-3.0-xml.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>XML Helper 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-vendor.html" title="XML Vendor Functions">
10 <link rel="next" href="ch03.html" title="Miscellaneous">
11 <meta name="generator" content="GTK-Doc V1.24 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
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.description" class="shortcut">Description</a></span>
19 </td>
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-vendor.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="libglabels-3.0-xml"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="libglabels-3.0-xml.top_of_page"></a>XML Helper Functions</span></h2>
30 <p>XML Helper Functions — Functions to help format and parse glabels XML properties</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="libglabels-3.0-xml.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-string" title="lgl_xml_get_prop_string ()">lgl_xml_get_prop_string</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
53 </td>
54 <td class="function_name">
55 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-i18n-string" title="lgl_xml_get_prop_i18n_string ()">lgl_xml_get_prop_i18n_string</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
61 </td>
62 <td class="function_name">
63 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-double" title="lgl_xml_get_prop_double ()">lgl_xml_get_prop_double</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
69 </td>
70 <td class="function_name">
71 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-boolean" title="lgl_xml_get_prop_boolean ()">lgl_xml_get_prop_boolean</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
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>
77 </td>
78 <td class="function_name">
79 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-int" title="lgl_xml_get_prop_int ()">lgl_xml_get_prop_int</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
85 </td>
86 <td class="function_name">
87 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-uint" title="lgl_xml_get_prop_uint ()">lgl_xml_get_prop_uint</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
93 </td>
94 <td class="function_name">
95 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-prop-length" title="lgl_xml_get_prop_length ()">lgl_xml_get_prop_length</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <span class="returnvalue">void</span>
101 </td>
102 <td class="function_name">
103 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-string" title="lgl_xml_set_prop_string ()">lgl_xml_set_prop_string</a> <span class="c_punctuation">()</span>
104 </td>
105 </tr>
106 <tr>
107 <td class="function_type">
108 <span class="returnvalue">void</span>
109 </td>
110 <td class="function_name">
111 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-double" title="lgl_xml_set_prop_double ()">lgl_xml_set_prop_double</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 <tr>
115 <td class="function_type">
116 <span class="returnvalue">void</span>
117 </td>
118 <td class="function_name">
119 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-boolean" title="lgl_xml_set_prop_boolean ()">lgl_xml_set_prop_boolean</a> <span class="c_punctuation">()</span>
120 </td>
121 </tr>
122 <tr>
123 <td class="function_type">
124 <span class="returnvalue">void</span>
125 </td>
126 <td class="function_name">
127 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-int" title="lgl_xml_set_prop_int ()">lgl_xml_set_prop_int</a> <span class="c_punctuation">()</span>
128 </td>
129 </tr>
130 <tr>
131 <td class="function_type">
132 <span class="returnvalue">void</span>
133 </td>
134 <td class="function_name">
135 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-uint-hex" title="lgl_xml_set_prop_uint_hex ()">lgl_xml_set_prop_uint_hex</a> <span class="c_punctuation">()</span>
136 </td>
137 </tr>
138 <tr>
139 <td class="function_type">
140 <span class="returnvalue">void</span>
141 </td>
142 <td class="function_name">
143 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-length" title="lgl_xml_set_prop_length ()">lgl_xml_set_prop_length</a> <span class="c_punctuation">()</span>
144 </td>
145 </tr>
146 <tr>
147 <td class="function_type">
148 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
149 </td>
150 <td class="function_name">
151 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-is-node" title="lgl_xml_is_node ()">lgl_xml_is_node</a> <span class="c_punctuation">()</span>
152 </td>
153 </tr>
154 <tr>
155 <td class="function_type">
156 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
157 </td>
158 <td class="function_name">
159 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-get-node-content" title="lgl_xml_get_node_content ()">lgl_xml_get_node_content</a> <span class="c_punctuation">()</span>
160 </td>
161 </tr>
162 <tr>
163 <td class="function_type">
164 <span class="returnvalue">void</span>
165 </td>
166 <td class="function_name">
167 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-default-units" title="lgl_xml_set_default_units ()">lgl_xml_set_default_units</a> <span class="c_punctuation">()</span>
168 </td>
169 </tr>
170 </tbody>
171 </table></div>
172 </div>
173 <div class="refsect1">
174 <a name="libglabels-3.0-xml.other"></a><h2>Types and Values</h2>
175 <div class="informaltable"><table width="100%" border="0">
176 <colgroup>
177 <col width="150px" class="name">
178 <col class="description">
179 </colgroup>
180 <tbody><tr>
181 <td class="define_keyword">#define</td>
182 <td class="function_name"><a class="link" href="libglabels-3.0-xml.html#LGL-XML-NAME-SPACE:CAPS" title="LGL_XML_NAME_SPACE">LGL_XML_NAME_SPACE</a></td>
183 </tr></tbody>
184 </table></div>
185 </div>
186 <div class="refsect1">
187 <a name="libglabels-3.0-xml.includes"></a><h2>Includes</h2>
188 <pre class="synopsis">#include &lt;libglabels/lgl-xml.h&gt;
189 </pre>
190 </div>
191 <div class="refsect1">
192 <a name="libglabels-3.0-xml.description"></a><h2>Description</h2>
193 <p>
194 This section describes a number of "helper" functions for formatting and
195 parsing various types of properties for tags in glabels XML file formats.
196 </p>
197 <p>
198 These functions are basically wrappers to functions from libxml2.
199 </p>
200 </div>
201 <div class="refsect1">
202 <a name="libglabels-3.0-xml.functions_details"></a><h2>Functions</h2>
203 <div class="refsect2">
204 <a name="lgl-xml-get-prop-string"></a><h3>lgl_xml_get_prop_string ()</h3>
205 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
206 lgl_xml_get_prop_string (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
207                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
208                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *default_val</code></em>);</pre>
209 <p>Return value of property as a string.</p>
210 <div class="refsect3">
211 <a name="id-1.3.6.7.2.5"></a><h4>Parameters</h4>
212 <div class="informaltable"><table width="100%" border="0">
213 <colgroup>
214 <col width="150px" class="parameters_name">
215 <col class="parameters_description">
216 <col width="200px" class="parameters_annotations">
217 </colgroup>
218 <tbody>
219 <tr>
220 <td class="parameter_name"><p>node</p></td>
221 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
222 <td class="parameter_annotations"> </td>
223 </tr>
224 <tr>
225 <td class="parameter_name"><p>property</p></td>
226 <td class="parameter_description"><p>the property name</p></td>
227 <td class="parameter_annotations"> </td>
228 </tr>
229 <tr>
230 <td class="parameter_name"><p>default_val</p></td>
231 <td class="parameter_description"><p>a default value to return if property not found</p></td>
232 <td class="parameter_annotations"> </td>
233 </tr>
234 </tbody>
235 </table></div>
236 </div>
237 <div class="refsect3">
238 <a name="id-1.3.6.7.2.6"></a><h4>Returns</h4>
239 <p> the property as a pointer to a gchar string.  This string should
240 be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</p>
241 </div>
242 </div>
243 <hr>
244 <div class="refsect2">
245 <a name="lgl-xml-get-prop-i18n-string"></a><h3>lgl_xml_get_prop_i18n_string ()</h3>
246 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
247 lgl_xml_get_prop_i18n_string (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
248                               <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
249                               <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *default_val</code></em>);</pre>
250 <p>Return value of a translatable property as a string.</p>
251 <div class="refsect3">
252 <a name="id-1.3.6.7.3.5"></a><h4>Parameters</h4>
253 <div class="informaltable"><table width="100%" border="0">
254 <colgroup>
255 <col width="150px" class="parameters_name">
256 <col class="parameters_description">
257 <col width="200px" class="parameters_annotations">
258 </colgroup>
259 <tbody>
260 <tr>
261 <td class="parameter_name"><p>node</p></td>
262 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
263 <td class="parameter_annotations"> </td>
264 </tr>
265 <tr>
266 <td class="parameter_name"><p>property</p></td>
267 <td class="parameter_description"><p>the property name</p></td>
268 <td class="parameter_annotations"> </td>
269 </tr>
270 <tr>
271 <td class="parameter_name"><p>default_val</p></td>
272 <td class="parameter_description"><p>a default value to return if property not found</p></td>
273 <td class="parameter_annotations"> </td>
274 </tr>
275 </tbody>
276 </table></div>
277 </div>
278 <div class="refsect3">
279 <a name="id-1.3.6.7.3.6"></a><h4>Returns</h4>
280 <p> the property as a pointer to a gchar string.  This string should
281 be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</p>
282 </div>
283 </div>
284 <hr>
285 <div class="refsect2">
286 <a name="lgl-xml-get-prop-double"></a><h3>lgl_xml_get_prop_double ()</h3>
287 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
288 lgl_xml_get_prop_double (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
289                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
290                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> default_val</code></em>);</pre>
291 <p>Return value of property as a double.</p>
292 <div class="refsect3">
293 <a name="id-1.3.6.7.4.5"></a><h4>Parameters</h4>
294 <div class="informaltable"><table width="100%" border="0">
295 <colgroup>
296 <col width="150px" class="parameters_name">
297 <col class="parameters_description">
298 <col width="200px" class="parameters_annotations">
299 </colgroup>
300 <tbody>
301 <tr>
302 <td class="parameter_name"><p>node</p></td>
303 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
304 <td class="parameter_annotations"> </td>
305 </tr>
306 <tr>
307 <td class="parameter_name"><p>property</p></td>
308 <td class="parameter_description"><p>the property name</p></td>
309 <td class="parameter_annotations"> </td>
310 </tr>
311 <tr>
312 <td class="parameter_name"><p>default_val</p></td>
313 <td class="parameter_description"><p>a default value to return if property not found</p></td>
314 <td class="parameter_annotations"> </td>
315 </tr>
316 </tbody>
317 </table></div>
318 </div>
319 <div class="refsect3">
320 <a name="id-1.3.6.7.4.6"></a><h4>Returns</h4>
321 <p> the property as a double.</p>
322 </div>
323 </div>
324 <hr>
325 <div class="refsect2">
326 <a name="lgl-xml-get-prop-boolean"></a><h3>lgl_xml_get_prop_boolean ()</h3>
327 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
328 lgl_xml_get_prop_boolean (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
329                           <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
330                           <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> default_val</code></em>);</pre>
331 <p>Return value of property as a boolean.</p>
332 <div class="refsect3">
333 <a name="id-1.3.6.7.5.5"></a><h4>Parameters</h4>
334 <div class="informaltable"><table width="100%" border="0">
335 <colgroup>
336 <col width="150px" class="parameters_name">
337 <col class="parameters_description">
338 <col width="200px" class="parameters_annotations">
339 </colgroup>
340 <tbody>
341 <tr>
342 <td class="parameter_name"><p>node</p></td>
343 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
344 <td class="parameter_annotations"> </td>
345 </tr>
346 <tr>
347 <td class="parameter_name"><p>property</p></td>
348 <td class="parameter_description"><p>the property name</p></td>
349 <td class="parameter_annotations"> </td>
350 </tr>
351 <tr>
352 <td class="parameter_name"><p>default_val</p></td>
353 <td class="parameter_description"><p>a default value to return if property not found</p></td>
354 <td class="parameter_annotations"> </td>
355 </tr>
356 </tbody>
357 </table></div>
358 </div>
359 <div class="refsect3">
360 <a name="id-1.3.6.7.5.6"></a><h4>Returns</h4>
361 <p> the property as a boolean.</p>
362 </div>
363 </div>
364 <hr>
365 <div class="refsect2">
366 <a name="lgl-xml-get-prop-int"></a><h3>lgl_xml_get_prop_int ()</h3>
367 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
368 lgl_xml_get_prop_int (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
369                       <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
370                       <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> default_val</code></em>);</pre>
371 <p>Return value of property as an integer.</p>
372 <div class="refsect3">
373 <a name="id-1.3.6.7.6.5"></a><h4>Parameters</h4>
374 <div class="informaltable"><table width="100%" border="0">
375 <colgroup>
376 <col width="150px" class="parameters_name">
377 <col class="parameters_description">
378 <col width="200px" class="parameters_annotations">
379 </colgroup>
380 <tbody>
381 <tr>
382 <td class="parameter_name"><p>node</p></td>
383 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
384 <td class="parameter_annotations"> </td>
385 </tr>
386 <tr>
387 <td class="parameter_name"><p>property</p></td>
388 <td class="parameter_description"><p>the property name</p></td>
389 <td class="parameter_annotations"> </td>
390 </tr>
391 <tr>
392 <td class="parameter_name"><p>default_val</p></td>
393 <td class="parameter_description"><p>a default value to return if property not found</p></td>
394 <td class="parameter_annotations"> </td>
395 </tr>
396 </tbody>
397 </table></div>
398 </div>
399 <div class="refsect3">
400 <a name="id-1.3.6.7.6.6"></a><h4>Returns</h4>
401 <p> the property as an integer.</p>
402 </div>
403 </div>
404 <hr>
405 <div class="refsect2">
406 <a name="lgl-xml-get-prop-uint"></a><h3>lgl_xml_get_prop_uint ()</h3>
407 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
408 lgl_xml_get_prop_uint (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
409                        <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
410                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> default_val</code></em>);</pre>
411 <p>Return value of property (usually formatted in hex) as an unsigned integer.</p>
412 <div class="refsect3">
413 <a name="id-1.3.6.7.7.5"></a><h4>Parameters</h4>
414 <div class="informaltable"><table width="100%" border="0">
415 <colgroup>
416 <col width="150px" class="parameters_name">
417 <col class="parameters_description">
418 <col width="200px" class="parameters_annotations">
419 </colgroup>
420 <tbody>
421 <tr>
422 <td class="parameter_name"><p>node</p></td>
423 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
424 <td class="parameter_annotations"> </td>
425 </tr>
426 <tr>
427 <td class="parameter_name"><p>property</p></td>
428 <td class="parameter_description"><p>the property name</p></td>
429 <td class="parameter_annotations"> </td>
430 </tr>
431 <tr>
432 <td class="parameter_name"><p>default_val</p></td>
433 <td class="parameter_description"><p>a default value to return if property not found</p></td>
434 <td class="parameter_annotations"> </td>
435 </tr>
436 </tbody>
437 </table></div>
438 </div>
439 <div class="refsect3">
440 <a name="id-1.3.6.7.7.6"></a><h4>Returns</h4>
441 <p> the property as an unsigned integer.</p>
442 </div>
443 </div>
444 <hr>
445 <div class="refsect2">
446 <a name="lgl-xml-get-prop-length"></a><h3>lgl_xml_get_prop_length ()</h3>
447 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
448 lgl_xml_get_prop_length (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
449                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
450                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> default_val</code></em>);</pre>
451 <p>Return value of a length property as a double, converting to internal
452 units (points).  The property is expected to be formatted as a number
453 followed by a units string.  If there is no units string, the length
454 is assumed to be in points.  Valid units strings are "pt" for points,
455 "in" for inches, "mm" for millimeters, "cm" for centimeters, and
456 "pc" for picas.</p>
457 <div class="refsect3">
458 <a name="id-1.3.6.7.8.5"></a><h4>Parameters</h4>
459 <div class="informaltable"><table width="100%" border="0">
460 <colgroup>
461 <col width="150px" class="parameters_name">
462 <col class="parameters_description">
463 <col width="200px" class="parameters_annotations">
464 </colgroup>
465 <tbody>
466 <tr>
467 <td class="parameter_name"><p>node</p></td>
468 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
469 <td class="parameter_annotations"> </td>
470 </tr>
471 <tr>
472 <td class="parameter_name"><p>property</p></td>
473 <td class="parameter_description"><p>the property name</p></td>
474 <td class="parameter_annotations"> </td>
475 </tr>
476 <tr>
477 <td class="parameter_name"><p>default_val</p></td>
478 <td class="parameter_description"><p>a default value to return if property not found</p></td>
479 <td class="parameter_annotations"> </td>
480 </tr>
481 </tbody>
482 </table></div>
483 </div>
484 <div class="refsect3">
485 <a name="id-1.3.6.7.8.6"></a><h4>Returns</h4>
486 <p> the length in points.</p>
487 </div>
488 </div>
489 <hr>
490 <div class="refsect2">
491 <a name="lgl-xml-set-prop-string"></a><h3>lgl_xml_set_prop_string ()</h3>
492 <pre class="programlisting"><span class="returnvalue">void</span>
493 lgl_xml_set_prop_string (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
494                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
495                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *val</code></em>);</pre>
496 <p>Set a property from a string.</p>
497 <div class="refsect3">
498 <a name="id-1.3.6.7.9.5"></a><h4>Parameters</h4>
499 <div class="informaltable"><table width="100%" border="0">
500 <colgroup>
501 <col width="150px" class="parameters_name">
502 <col class="parameters_description">
503 <col width="200px" class="parameters_annotations">
504 </colgroup>
505 <tbody>
506 <tr>
507 <td class="parameter_name"><p>node</p></td>
508 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
509 <td class="parameter_annotations"> </td>
510 </tr>
511 <tr>
512 <td class="parameter_name"><p>property</p></td>
513 <td class="parameter_description"><p>the property name</p></td>
514 <td class="parameter_annotations"> </td>
515 </tr>
516 <tr>
517 <td class="parameter_name"><p>val</p></td>
518 <td class="parameter_description"><p>the value to set</p></td>
519 <td class="parameter_annotations"> </td>
520 </tr>
521 </tbody>
522 </table></div>
523 </div>
524 </div>
525 <hr>
526 <div class="refsect2">
527 <a name="lgl-xml-set-prop-double"></a><h3>lgl_xml_set_prop_double ()</h3>
528 <pre class="programlisting"><span class="returnvalue">void</span>
529 lgl_xml_set_prop_double (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
530                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
531                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> val</code></em>);</pre>
532 <p>Set a property from a double.</p>
533 <div class="refsect3">
534 <a name="id-1.3.6.7.10.5"></a><h4>Parameters</h4>
535 <div class="informaltable"><table width="100%" border="0">
536 <colgroup>
537 <col width="150px" class="parameters_name">
538 <col class="parameters_description">
539 <col width="200px" class="parameters_annotations">
540 </colgroup>
541 <tbody>
542 <tr>
543 <td class="parameter_name"><p>node</p></td>
544 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
545 <td class="parameter_annotations"> </td>
546 </tr>
547 <tr>
548 <td class="parameter_name"><p>property</p></td>
549 <td class="parameter_description"><p>the property name</p></td>
550 <td class="parameter_annotations"> </td>
551 </tr>
552 <tr>
553 <td class="parameter_name"><p>val</p></td>
554 <td class="parameter_description"><p>the value to set</p></td>
555 <td class="parameter_annotations"> </td>
556 </tr>
557 </tbody>
558 </table></div>
559 </div>
560 </div>
561 <hr>
562 <div class="refsect2">
563 <a name="lgl-xml-set-prop-boolean"></a><h3>lgl_xml_set_prop_boolean ()</h3>
564 <pre class="programlisting"><span class="returnvalue">void</span>
565 lgl_xml_set_prop_boolean (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
566                           <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
567                           <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> val</code></em>);</pre>
568 <p>Set a property from a boolean.</p>
569 <div class="refsect3">
570 <a name="id-1.3.6.7.11.5"></a><h4>Parameters</h4>
571 <div class="informaltable"><table width="100%" border="0">
572 <colgroup>
573 <col width="150px" class="parameters_name">
574 <col class="parameters_description">
575 <col width="200px" class="parameters_annotations">
576 </colgroup>
577 <tbody>
578 <tr>
579 <td class="parameter_name"><p>node</p></td>
580 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
581 <td class="parameter_annotations"> </td>
582 </tr>
583 <tr>
584 <td class="parameter_name"><p>property</p></td>
585 <td class="parameter_description"><p>the property name</p></td>
586 <td class="parameter_annotations"> </td>
587 </tr>
588 <tr>
589 <td class="parameter_name"><p>val</p></td>
590 <td class="parameter_description"><p>the value to set</p></td>
591 <td class="parameter_annotations"> </td>
592 </tr>
593 </tbody>
594 </table></div>
595 </div>
596 </div>
597 <hr>
598 <div class="refsect2">
599 <a name="lgl-xml-set-prop-int"></a><h3>lgl_xml_set_prop_int ()</h3>
600 <pre class="programlisting"><span class="returnvalue">void</span>
601 lgl_xml_set_prop_int (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
602                       <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
603                       <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> val</code></em>);</pre>
604 <p>Set a property from an integer.</p>
605 <div class="refsect3">
606 <a name="id-1.3.6.7.12.5"></a><h4>Parameters</h4>
607 <div class="informaltable"><table width="100%" border="0">
608 <colgroup>
609 <col width="150px" class="parameters_name">
610 <col class="parameters_description">
611 <col width="200px" class="parameters_annotations">
612 </colgroup>
613 <tbody>
614 <tr>
615 <td class="parameter_name"><p>node</p></td>
616 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
617 <td class="parameter_annotations"> </td>
618 </tr>
619 <tr>
620 <td class="parameter_name"><p>property</p></td>
621 <td class="parameter_description"><p>the property name</p></td>
622 <td class="parameter_annotations"> </td>
623 </tr>
624 <tr>
625 <td class="parameter_name"><p>val</p></td>
626 <td class="parameter_description"><p>the value to set</p></td>
627 <td class="parameter_annotations"> </td>
628 </tr>
629 </tbody>
630 </table></div>
631 </div>
632 </div>
633 <hr>
634 <div class="refsect2">
635 <a name="lgl-xml-set-prop-uint-hex"></a><h3>lgl_xml_set_prop_uint_hex ()</h3>
636 <pre class="programlisting"><span class="returnvalue">void</span>
637 lgl_xml_set_prop_uint_hex (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
638                            <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
639                            <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> val</code></em>);</pre>
640 <p>Set a property from an unsigned integer and format in hex.</p>
641 <div class="refsect3">
642 <a name="id-1.3.6.7.13.5"></a><h4>Parameters</h4>
643 <div class="informaltable"><table width="100%" border="0">
644 <colgroup>
645 <col width="150px" class="parameters_name">
646 <col class="parameters_description">
647 <col width="200px" class="parameters_annotations">
648 </colgroup>
649 <tbody>
650 <tr>
651 <td class="parameter_name"><p>node</p></td>
652 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
653 <td class="parameter_annotations"> </td>
654 </tr>
655 <tr>
656 <td class="parameter_name"><p>property</p></td>
657 <td class="parameter_description"><p>the property name</p></td>
658 <td class="parameter_annotations"> </td>
659 </tr>
660 <tr>
661 <td class="parameter_name"><p>val</p></td>
662 <td class="parameter_description"><p>the value to set</p></td>
663 <td class="parameter_annotations"> </td>
664 </tr>
665 </tbody>
666 </table></div>
667 </div>
668 </div>
669 <hr>
670 <div class="refsect2">
671 <a name="lgl-xml-set-prop-length"></a><h3>lgl_xml_set_prop_length ()</h3>
672 <pre class="programlisting"><span class="returnvalue">void</span>
673 lgl_xml_set_prop_length (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
674                          <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
675                          <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> val</code></em>);</pre>
676 <p>Set a property from a length, performing any necessary conversion.
677 Length properties are formatted as a number followed by a units string.
678 The units of the formatted property is determined by the most recent call to
679 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-default-units" title="lgl_xml_set_default_units ()"><code class="function">lgl_xml_set_default_units()</code></a>.</p>
680 <div class="refsect3">
681 <a name="id-1.3.6.7.14.5"></a><h4>Parameters</h4>
682 <div class="informaltable"><table width="100%" border="0">
683 <colgroup>
684 <col width="150px" class="parameters_name">
685 <col class="parameters_description">
686 <col width="200px" class="parameters_annotations">
687 </colgroup>
688 <tbody>
689 <tr>
690 <td class="parameter_name"><p>node</p></td>
691 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
692 <td class="parameter_annotations"> </td>
693 </tr>
694 <tr>
695 <td class="parameter_name"><p>property</p></td>
696 <td class="parameter_description"><p>the property name</p></td>
697 <td class="parameter_annotations"> </td>
698 </tr>
699 <tr>
700 <td class="parameter_name"><p>val</p></td>
701 <td class="parameter_description"><p>the length to set in internal units (points)</p></td>
702 <td class="parameter_annotations"> </td>
703 </tr>
704 </tbody>
705 </table></div>
706 </div>
707 </div>
708 <hr>
709 <div class="refsect2">
710 <a name="lgl-xml-is-node"></a><h3>lgl_xml_is_node ()</h3>
711 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
712 lgl_xml_is_node (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>,
713                  <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
714 <p>Test if a node name matches given name.</p>
715 <div class="refsect3">
716 <a name="id-1.3.6.7.15.5"></a><h4>Parameters</h4>
717 <div class="informaltable"><table width="100%" border="0">
718 <colgroup>
719 <col width="150px" class="parameters_name">
720 <col class="parameters_description">
721 <col width="200px" class="parameters_annotations">
722 </colgroup>
723 <tbody>
724 <tr>
725 <td class="parameter_name"><p>node</p></td>
726 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
727 <td class="parameter_annotations"> </td>
728 </tr>
729 <tr>
730 <td class="parameter_name"><p>name</p></td>
731 <td class="parameter_description"><p>the node name</p></td>
732 <td class="parameter_annotations"> </td>
733 </tr>
734 </tbody>
735 </table></div>
736 </div>
737 <div class="refsect3">
738 <a name="id-1.3.6.7.15.6"></a><h4>Returns</h4>
739 <p> TRUE if the name of the node matches.  Otherwise FALSE.</p>
740 </div>
741 </div>
742 <hr>
743 <div class="refsect2">
744 <a name="lgl-xml-get-node-content"></a><h3>lgl_xml_get_node_content ()</h3>
745 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
746 lgl_xml_get_node_content (<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>);</pre>
747 <p>Get the content of a node.</p>
748 <div class="refsect3">
749 <a name="id-1.3.6.7.16.5"></a><h4>Parameters</h4>
750 <div class="informaltable"><table width="100%" border="0">
751 <colgroup>
752 <col width="150px" class="parameters_name">
753 <col class="parameters_description">
754 <col width="200px" class="parameters_annotations">
755 </colgroup>
756 <tbody><tr>
757 <td class="parameter_name"><p>node</p></td>
758 <td class="parameter_description"><p>the libxml2 <span class="type">xmlNodePtr</span> of the node</p></td>
759 <td class="parameter_annotations"> </td>
760 </tr></tbody>
761 </table></div>
762 </div>
763 <div class="refsect3">
764 <a name="id-1.3.6.7.16.6"></a><h4>Returns</h4>
765 <p> the property as a pointer to a gchar string.  This string should
766 be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</p>
767 </div>
768 </div>
769 <hr>
770 <div class="refsect2">
771 <a name="lgl-xml-set-default-units"></a><h3>lgl_xml_set_default_units ()</h3>
772 <pre class="programlisting"><span class="returnvalue">void</span>
773 lgl_xml_set_default_units (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);</pre>
774 <p>Set the default units when formatting lengths.  See
775 <a class="link" href="libglabels-3.0-xml.html#lgl-xml-set-prop-length" title="lgl_xml_set_prop_length ()"><code class="function">lgl_xml_set_prop_length()</code></a>.</p>
776 <div class="refsect3">
777 <a name="id-1.3.6.7.17.5"></a><h4>Parameters</h4>
778 <div class="informaltable"><table width="100%" border="0">
779 <colgroup>
780 <col width="150px" class="parameters_name">
781 <col class="parameters_description">
782 <col width="200px" class="parameters_annotations">
783 </colgroup>
784 <tbody><tr>
785 <td class="parameter_name"><p>units</p></td>
786 <td class="parameter_description"><p>default units selection (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>)</p></td>
787 <td class="parameter_annotations"> </td>
788 </tr></tbody>
789 </table></div>
790 </div>
791 </div>
792 </div>
793 <div class="refsect1">
794 <a name="libglabels-3.0-xml.other_details"></a><h2>Types and Values</h2>
795 <div class="refsect2">
796 <a name="LGL-XML-NAME-SPACE:CAPS"></a><h3>LGL_XML_NAME_SPACE</h3>
797 <pre class="programlisting">#define LGL_XML_NAME_SPACE "http://glabels.org/xmlns/3.0/"
798 </pre>
799 <p>
800 </p>
801 </div>
802 </div>
803 </div>
804 <div class="footer">
805 <hr>Generated by GTK-Doc V1.24</div>
806 </body>
807 </html>