blob: 3db7105e90041fd8f68676677059a2e351207874 [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <title>TestON.core.xmldict</title>
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12 alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
16 <tr valign="middle">
17 <!-- Home link -->
18 <th>&nbsp;&nbsp;&nbsp;<a
19 href="TestON-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21 <!-- Tree link -->
22 <th>&nbsp;&nbsp;&nbsp;<a
23 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25 <!-- Index link -->
26 <th>&nbsp;&nbsp;&nbsp;<a
27 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29 <!-- Help link -->
30 <th>&nbsp;&nbsp;&nbsp;<a
31 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
Jon Halla1cdd892015-08-10 13:36:28 -070033 <!-- Project homepage -->
34 <th class="navbar" align="right" width="100%">
35 <table border="0" cellpadding="0" cellspacing="0">
36 <tr><th class="navbar" align="center"
37 >TestON</th>
38 </tr></table></th>
adminbae64d82013-08-01 10:50:15 -070039 </tr>
40</table>
41<table width="100%" cellpadding="0" cellspacing="0">
42 <tr valign="top">
43 <td width="100%">
44 <span class="breadcrumbs">
45 <a href="TestON-module.html">Package&nbsp;TestON</a> ::
46 <a href="TestON.core-module.html">Package&nbsp;core</a> ::
47 Module&nbsp;xmldict
48 </span>
49 </td>
50 <td>
51 <table cellpadding="0" cellspacing="0">
52 <!-- hide/show private -->
53 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
54 onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
55 <tr><td align="right"><span class="options"
56 >[<a href="frames.html" target="_top">frames</a
57 >]&nbsp;|&nbsp;<a href="TestON.core.xmldict-module.html"
58 target="_top">no&nbsp;frames</a>]</span></td></tr>
59 </table>
60 </td>
61 </tr>
62</table>
63<!-- ==================== MODULE DESCRIPTION ==================== -->
64<h1 class="epydoc">Module xmldict</h1><p class="nomargin-top"><span class="codelink"><a href="TestON.core.xmldict-pysrc.html">source&nbsp;code</a></span></p>
65<p>Created on 03-Dec-2012</p>
66
67<hr />
68<div class="fields"> <p><strong>Author:</strong>
69 Anil Kumar (anilkumar.s@paxterrasolutions.com)
Jon Halla1cdd892015-08-10 13:36:28 -070070 <p>TestON is free software: you can redistribute it and/or modify
71 it under the terms of the GNU General Public License as published
72 by the Free Software Foundation, either version 2 of the License,
73 or (at your option) any later version.</p>
74 <p>TestON is distributed in the hope that it will be useful, but
75 WITHOUT ANY WARRANTY; without even the implied warranty of
76 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
77 General Public License for more details.</p>
78 <p>You should have received a copy of the GNU General Public
79 License along with TestON. If not, see
80 &lt;http://www.gnu.org/licenses/&gt;.</p>
adminbae64d82013-08-01 10:50:15 -070081 </p>
82</div><!-- ==================== FUNCTIONS ==================== -->
83<a name="section-Functions"></a>
84<table class="summary" border="1" cellpadding="3"
85 cellspacing="0" width="100%" bgcolor="white">
86<tr bgcolor="#70b0f0" class="table-header">
87 <td colspan="2" class="table-header">
88 <table border="0" cellpadding="0" cellspacing="0" width="100%">
89 <tr valign="top">
90 <td align="left"><span class="table-header">Functions</span></td>
91 <td align="right" valign="top"
92 ><span class="options">[<a href="#section-Functions"
93 class="privatelink" onclick="toggle_private();"
94 >hide private</a>]</span></td>
95 </tr>
96 </table>
97 </td>
98</tr>
99<tr>
100 <td width="15%" align="right" valign="top" class="summary">
101 <span class="summary-type">&nbsp;</span>
102 </td><td class="summary">
103 <table width="100%" cellpadding="0" cellspacing="0" border="0">
104 <tr>
105 <td><span class="summary-sig"><a name="xml_to_dict"></a><span class="summary-sig-name">xml_to_dict</span>(<span class="summary-sig-arg">root_or_str</span>,
106 <span class="summary-sig-arg">strict</span>=<span class="summary-sig-default">True</span>)</span><br />
107 Converts `root_or_str` which can be parsed xml or a xml string to
108 dict.</td>
109 <td align="right" valign="top">
110 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#xml_to_dict">source&nbsp;code</a></span>
111
112 </td>
113 </tr>
114 </table>
115
116 </td>
117 </tr>
118<tr>
119 <td width="15%" align="right" valign="top" class="summary">
120 <span class="summary-type">&nbsp;</span>
121 </td><td class="summary">
122 <table width="100%" cellpadding="0" cellspacing="0" border="0">
123 <tr>
124 <td><span class="summary-sig"><a name="dict_to_xml"></a><span class="summary-sig-name">dict_to_xml</span>(<span class="summary-sig-arg">dict_xml</span>)</span><br />
125 Converts `dict_xml` which is a python dict to corresponding xml.</td>
126 <td align="right" valign="top">
127 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#dict_to_xml">source&nbsp;code</a></span>
128
129 </td>
130 </tr>
131 </table>
132
133 </td>
134 </tr>
135<tr class="private">
136 <td width="15%" align="right" valign="top" class="summary">
137 <span class="summary-type">&nbsp;</span>
138 </td><td class="summary">
139 <table width="100%" cellpadding="0" cellspacing="0" border="0">
140 <tr>
141 <td><span class="summary-sig"><a name="_to_xml"></a><span class="summary-sig-name">_to_xml</span>(<span class="summary-sig-arg">el</span>)</span><br />
142 Converts `el` to its xml representation.</td>
143 <td align="right" valign="top">
144 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_to_xml">source&nbsp;code</a></span>
145
146 </td>
147 </tr>
148 </table>
149
150 </td>
151 </tr>
152<tr class="private">
153 <td width="15%" align="right" valign="top" class="summary">
154 <span class="summary-type">&nbsp;</span>
155 </td><td class="summary">
156 <table width="100%" cellpadding="0" cellspacing="0" border="0">
157 <tr>
158 <td><span class="summary-sig"><a href="TestON.core.xmldict-module.html#_extract_attrs" class="summary-sig-name" onclick="show_private();">_extract_attrs</a>(<span class="summary-sig-arg">els</span>)</span><br />
159 Extracts attributes from dictionary `els`.</td>
160 <td align="right" valign="top">
161 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_extract_attrs">source&nbsp;code</a></span>
162
163 </td>
164 </tr>
165 </table>
166
167 </td>
168 </tr>
169<tr class="private">
170 <td width="15%" align="right" valign="top" class="summary">
171 <span class="summary-type">&nbsp;</span>
172 </td><td class="summary">
173 <table width="100%" cellpadding="0" cellspacing="0" border="0">
174 <tr>
175 <td><span class="summary-sig"><a name="_dict_to_xml"></a><span class="summary-sig-name">_dict_to_xml</span>(<span class="summary-sig-arg">els</span>)</span><br />
176 Converts `els` which is a python dict to corresponding xml.</td>
177 <td align="right" valign="top">
178 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_dict_to_xml">source&nbsp;code</a></span>
179
180 </td>
181 </tr>
182 </table>
183
184 </td>
185 </tr>
186<tr class="private">
187 <td width="15%" align="right" valign="top" class="summary">
188 <span class="summary-type">&nbsp;</span>
189 </td><td class="summary">
190 <table width="100%" cellpadding="0" cellspacing="0" border="0">
191 <tr>
192 <td><span class="summary-sig"><a href="TestON.core.xmldict-module.html#_is_xml_el_dict" class="summary-sig-name" onclick="show_private();">_is_xml_el_dict</a>(<span class="summary-sig-arg">el</span>)</span><br />
193 Returns true if `el` is supposed to be a dict.</td>
194 <td align="right" valign="top">
195 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_dict">source&nbsp;code</a></span>
196
197 </td>
198 </tr>
199 </table>
200
201 </td>
202 </tr>
203<tr class="private">
204 <td width="15%" align="right" valign="top" class="summary">
205 <span class="summary-type">&nbsp;</span>
206 </td><td class="summary">
207 <table width="100%" cellpadding="0" cellspacing="0" border="0">
208 <tr>
209 <td><span class="summary-sig"><a href="TestON.core.xmldict-module.html#_is_xml_el_list" class="summary-sig-name" onclick="show_private();">_is_xml_el_list</a>(<span class="summary-sig-arg">el</span>)</span><br />
210 Returns true if `el` is supposed to be a list.</td>
211 <td align="right" valign="top">
212 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_list">source&nbsp;code</a></span>
213
214 </td>
215 </tr>
216 </table>
217
218 </td>
219 </tr>
220<tr class="private">
221 <td width="15%" align="right" valign="top" class="summary">
222 <span class="summary-type">&nbsp;</span>
223 </td><td class="summary">
224 <table width="100%" cellpadding="0" cellspacing="0" border="0">
225 <tr>
226 <td><span class="summary-sig"><a name="_str_to_datetime"></a><span class="summary-sig-name">_str_to_datetime</span>(<span class="summary-sig-arg">date_str</span>)</span></td>
227 <td align="right" valign="top">
228 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_str_to_datetime">source&nbsp;code</a></span>
229
230 </td>
231 </tr>
232 </table>
233
234 </td>
235 </tr>
236<tr class="private">
237 <td width="15%" align="right" valign="top" class="summary">
238 <span class="summary-type">&nbsp;</span>
239 </td><td class="summary">
240 <table width="100%" cellpadding="0" cellspacing="0" border="0">
241 <tr>
242 <td><span class="summary-sig"><a name="_str_to_boolean"></a><span class="summary-sig-name">_str_to_boolean</span>(<span class="summary-sig-arg">bool_str</span>)</span></td>
243 <td align="right" valign="top">
244 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_str_to_boolean">source&nbsp;code</a></span>
245
246 </td>
247 </tr>
248 </table>
249
250 </td>
251 </tr>
252<tr class="private">
253 <td width="15%" align="right" valign="top" class="summary">
254 <span class="summary-type">&nbsp;</span>
255 </td><td class="summary">
256 <table width="100%" cellpadding="0" cellspacing="0" border="0">
257 <tr>
258 <td><span class="summary-sig"><a name="_from_xml"></a><span class="summary-sig-name">_from_xml</span>(<span class="summary-sig-arg">el</span>,
259 <span class="summary-sig-arg">strict</span>)</span><br />
260 Extracts value of xml element element `el`.</td>
261 <td align="right" valign="top">
262 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_from_xml">source&nbsp;code</a></span>
263
264 </td>
265 </tr>
266 </table>
267
268 </td>
269 </tr>
270<tr class="private">
271 <td width="15%" align="right" valign="top" class="summary">
272 <span class="summary-type">&nbsp;</span>
273 </td><td class="summary">
274 <table width="100%" cellpadding="0" cellspacing="0" border="0">
275 <tr>
276 <td><span class="summary-sig"><a name="_val_and_maybe_convert"></a><span class="summary-sig-name">_val_and_maybe_convert</span>(<span class="summary-sig-arg">el</span>)</span><br />
277 Converts `el.text` if `el` has attribute `type` with valid value.</td>
278 <td align="right" valign="top">
279 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_val_and_maybe_convert">source&nbsp;code</a></span>
280
281 </td>
282 </tr>
283 </table>
284
285 </td>
286 </tr>
287<tr class="private">
288 <td width="15%" align="right" valign="top" class="summary">
289 <span class="summary-type">&nbsp;</span>
290 </td><td class="summary">
291 <table width="100%" cellpadding="0" cellspacing="0" border="0">
292 <tr>
293 <td><span class="summary-sig"><a name="_list_from_xml"></a><span class="summary-sig-name">_list_from_xml</span>(<span class="summary-sig-arg">els</span>,
294 <span class="summary-sig-arg">strict</span>)</span><br />
295 Converts xml elements list `el_list` to a python list.</td>
296 <td align="right" valign="top">
297 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_list_from_xml">source&nbsp;code</a></span>
298
299 </td>
300 </tr>
301 </table>
302
303 </td>
304 </tr>
305<tr class="private">
306 <td width="15%" align="right" valign="top" class="summary">
307 <span class="summary-type">&nbsp;</span>
308 </td><td class="summary">
309 <table width="100%" cellpadding="0" cellspacing="0" border="0">
310 <tr>
311 <td><span class="summary-sig"><a name="_dict_from_xml"></a><span class="summary-sig-name">_dict_from_xml</span>(<span class="summary-sig-arg">els</span>,
312 <span class="summary-sig-arg">strict</span>)</span><br />
313 Converts xml doc with root `root` to a python dict.</td>
314 <td align="right" valign="top">
315 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_dict_from_xml">source&nbsp;code</a></span>
316
317 </td>
318 </tr>
319 </table>
320
321 </td>
322 </tr>
323</table>
Jon Halla1cdd892015-08-10 13:36:28 -0700324<!-- ==================== VARIABLES ==================== -->
325<a name="section-Variables"></a>
326<table class="summary" border="1" cellpadding="3"
327 cellspacing="0" width="100%" bgcolor="white">
328<tr bgcolor="#70b0f0" class="table-header">
329 <td colspan="2" class="table-header">
330 <table border="0" cellpadding="0" cellspacing="0" width="100%">
331 <tr valign="top">
332 <td align="left"><span class="table-header">Variables</span></td>
333 <td align="right" valign="top"
334 ><span class="options">[<a href="#section-Variables"
335 class="privatelink" onclick="toggle_private();"
336 >hide private</a>]</span></td>
337 </tr>
338 </table>
339 </td>
340</tr>
341<tr>
342 <td width="15%" align="right" valign="top" class="summary">
343 <span class="summary-type">&nbsp;</span>
344 </td><td class="summary">
345 <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'TestON.core'"><code class="variable-quote">'</code><code class="variable-string">TestON.core</code><code class="variable-quote">'</code></code>
346 </td>
347 </tr>
348</table>
adminbae64d82013-08-01 10:50:15 -0700349<!-- ==================== FUNCTION DETAILS ==================== -->
350<a name="section-FunctionDetails"></a>
351<table class="details" border="1" cellpadding="3"
352 cellspacing="0" width="100%" bgcolor="white">
353<tr bgcolor="#70b0f0" class="table-header">
354 <td colspan="2" class="table-header">
355 <table border="0" cellpadding="0" cellspacing="0" width="100%">
356 <tr valign="top">
357 <td align="left"><span class="table-header">Function Details</span></td>
358 <td align="right" valign="top"
359 ><span class="options">[<a href="#section-FunctionDetails"
360 class="privatelink" onclick="toggle_private();"
361 >hide private</a>]</span></td>
362 </tr>
363 </table>
364 </td>
365</tr>
366</table>
367<a name="_extract_attrs"></a>
368<div class="private">
369<table class="details" border="1" cellpadding="3"
370 cellspacing="0" width="100%" bgcolor="white">
371<tr><td>
372 <table width="100%" cellpadding="0" cellspacing="0" border="0">
373 <tr valign="top"><td>
374 <h3 class="epydoc"><span class="sig"><span class="sig-name">_extract_attrs</span>(<span class="sig-arg">els</span>)</span>
375 </h3>
376 </td><td align="right" valign="top"
377 ><span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_extract_attrs">source&nbsp;code</a></span>&nbsp;
378 </td>
379 </tr></table>
380
381 <p>Extracts attributes from dictionary `els`. Attributes are keys which
382 start with '@'</p>
383 <dl class="fields">
384 </dl>
385</td></tr></table>
386</div>
387<a name="_is_xml_el_dict"></a>
388<div class="private">
389<table class="details" border="1" cellpadding="3"
390 cellspacing="0" width="100%" bgcolor="white">
391<tr><td>
392 <table width="100%" cellpadding="0" cellspacing="0" border="0">
393 <tr valign="top"><td>
394 <h3 class="epydoc"><span class="sig"><span class="sig-name">_is_xml_el_dict</span>(<span class="sig-arg">el</span>)</span>
395 </h3>
396 </td><td align="right" valign="top"
397 ><span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_dict">source&nbsp;code</a></span>&nbsp;
398 </td>
399 </tr></table>
400
401 <p>Returns true if `el` is supposed to be a dict. This function makes
402 sense only in the context of making dicts out of xml.</p>
403 <dl class="fields">
404 </dl>
405</td></tr></table>
406</div>
407<a name="_is_xml_el_list"></a>
408<div class="private">
409<table class="details" border="1" cellpadding="3"
410 cellspacing="0" width="100%" bgcolor="white">
411<tr><td>
412 <table width="100%" cellpadding="0" cellspacing="0" border="0">
413 <tr valign="top"><td>
414 <h3 class="epydoc"><span class="sig"><span class="sig-name">_is_xml_el_list</span>(<span class="sig-arg">el</span>)</span>
415 </h3>
416 </td><td align="right" valign="top"
417 ><span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_list">source&nbsp;code</a></span>&nbsp;
418 </td>
419 </tr></table>
420
421 <p>Returns true if `el` is supposed to be a list. This function makes
422 sense only in the context of making lists out of xml.</p>
423 <dl class="fields">
424 </dl>
425</td></tr></table>
426</div>
427<br />
428<!-- ==================== NAVIGATION BAR ==================== -->
429<table class="navbar" border="0" width="100%" cellpadding="0"
430 bgcolor="#a0c0ff" cellspacing="0">
431 <tr valign="middle">
432 <!-- Home link -->
433 <th>&nbsp;&nbsp;&nbsp;<a
434 href="TestON-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
435
436 <!-- Tree link -->
437 <th>&nbsp;&nbsp;&nbsp;<a
438 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
439
440 <!-- Index link -->
441 <th>&nbsp;&nbsp;&nbsp;<a
442 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
443
444 <!-- Help link -->
445 <th>&nbsp;&nbsp;&nbsp;<a
446 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
447
Jon Halla1cdd892015-08-10 13:36:28 -0700448 <!-- Project homepage -->
449 <th class="navbar" align="right" width="100%">
450 <table border="0" cellpadding="0" cellspacing="0">
451 <tr><th class="navbar" align="center"
452 >TestON</th>
453 </tr></table></th>
adminbae64d82013-08-01 10:50:15 -0700454 </tr>
455</table>
456<table border="0" cellpadding="0" cellspacing="0" width="100%%">
457 <tr>
458 <td align="left" class="footer">
Jon Halla1cdd892015-08-10 13:36:28 -0700459 Generated by Epydoc 3.0.1 on Mon Aug 10 11:12:34 2015
adminbae64d82013-08-01 10:50:15 -0700460 </td>
461 <td align="right" class="footer">
462 <a target="mainFrame" href="http://epydoc.sourceforge.net"
463 >http://epydoc.sourceforge.net</a>
464 </td>
465 </tr>
466</table>
467
468<script type="text/javascript">
469 <!--
470 // Private objects are initially displayed (because if
471 // javascript is turned off then we want them to be
472 // visible); but by default, we want to hide them. So hide
473 // them unless we have a cookie that says to show them.
474 checkCookie();
475 // -->
476</script>
477</body>
478</html>