blob: f66829c497fe40aa7d776a727eebdeedd1bb87b2 [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
33 <th class="navbar" width="100%"></th>
34 </tr>
35</table>
36<table width="100%" cellpadding="0" cellspacing="0">
37 <tr valign="top">
38 <td width="100%">
39 <span class="breadcrumbs">
40 <a href="TestON-module.html">Package&nbsp;TestON</a> ::
41 <a href="TestON.core-module.html">Package&nbsp;core</a> ::
42 Module&nbsp;xmldict
43 </span>
44 </td>
45 <td>
46 <table cellpadding="0" cellspacing="0">
47 <!-- hide/show private -->
48 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
49 onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
50 <tr><td align="right"><span class="options"
51 >[<a href="frames.html" target="_top">frames</a
52 >]&nbsp;|&nbsp;<a href="TestON.core.xmldict-module.html"
53 target="_top">no&nbsp;frames</a>]</span></td></tr>
54 </table>
55 </td>
56 </tr>
57</table>
58<!-- ==================== MODULE DESCRIPTION ==================== -->
59<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>
60<p>Created on 03-Dec-2012</p>
61
62<hr />
63<div class="fields"> <p><strong>Author:</strong>
64 Anil Kumar (anilkumar.s@paxterrasolutions.com)
65 </p>
66</div><!-- ==================== FUNCTIONS ==================== -->
67<a name="section-Functions"></a>
68<table class="summary" border="1" cellpadding="3"
69 cellspacing="0" width="100%" bgcolor="white">
70<tr bgcolor="#70b0f0" class="table-header">
71 <td colspan="2" class="table-header">
72 <table border="0" cellpadding="0" cellspacing="0" width="100%">
73 <tr valign="top">
74 <td align="left"><span class="table-header">Functions</span></td>
75 <td align="right" valign="top"
76 ><span class="options">[<a href="#section-Functions"
77 class="privatelink" onclick="toggle_private();"
78 >hide private</a>]</span></td>
79 </tr>
80 </table>
81 </td>
82</tr>
83<tr>
84 <td width="15%" align="right" valign="top" class="summary">
85 <span class="summary-type">&nbsp;</span>
86 </td><td class="summary">
87 <table width="100%" cellpadding="0" cellspacing="0" border="0">
88 <tr>
89 <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>,
90 <span class="summary-sig-arg">strict</span>=<span class="summary-sig-default">True</span>)</span><br />
91 Converts `root_or_str` which can be parsed xml or a xml string to
92 dict.</td>
93 <td align="right" valign="top">
94 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#xml_to_dict">source&nbsp;code</a></span>
95
96 </td>
97 </tr>
98 </table>
99
100 </td>
101 </tr>
102<tr>
103 <td width="15%" align="right" valign="top" class="summary">
104 <span class="summary-type">&nbsp;</span>
105 </td><td class="summary">
106 <table width="100%" cellpadding="0" cellspacing="0" border="0">
107 <tr>
108 <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 />
109 Converts `dict_xml` which is a python dict to corresponding xml.</td>
110 <td align="right" valign="top">
111 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#dict_to_xml">source&nbsp;code</a></span>
112
113 </td>
114 </tr>
115 </table>
116
117 </td>
118 </tr>
119<tr class="private">
120 <td width="15%" align="right" valign="top" class="summary">
121 <span class="summary-type">&nbsp;</span>
122 </td><td class="summary">
123 <table width="100%" cellpadding="0" cellspacing="0" border="0">
124 <tr>
125 <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 />
126 Converts `el` to its xml representation.</td>
127 <td align="right" valign="top">
128 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_to_xml">source&nbsp;code</a></span>
129
130 </td>
131 </tr>
132 </table>
133
134 </td>
135 </tr>
136<tr class="private">
137 <td width="15%" align="right" valign="top" class="summary">
138 <span class="summary-type">&nbsp;</span>
139 </td><td class="summary">
140 <table width="100%" cellpadding="0" cellspacing="0" border="0">
141 <tr>
142 <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 />
143 Extracts attributes from dictionary `els`.</td>
144 <td align="right" valign="top">
145 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_extract_attrs">source&nbsp;code</a></span>
146
147 </td>
148 </tr>
149 </table>
150
151 </td>
152 </tr>
153<tr class="private">
154 <td width="15%" align="right" valign="top" class="summary">
155 <span class="summary-type">&nbsp;</span>
156 </td><td class="summary">
157 <table width="100%" cellpadding="0" cellspacing="0" border="0">
158 <tr>
159 <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 />
160 Converts `els` which is a python dict to corresponding xml.</td>
161 <td align="right" valign="top">
162 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_dict_to_xml">source&nbsp;code</a></span>
163
164 </td>
165 </tr>
166 </table>
167
168 </td>
169 </tr>
170<tr class="private">
171 <td width="15%" align="right" valign="top" class="summary">
172 <span class="summary-type">&nbsp;</span>
173 </td><td class="summary">
174 <table width="100%" cellpadding="0" cellspacing="0" border="0">
175 <tr>
176 <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 />
177 Returns true if `el` is supposed to be a dict.</td>
178 <td align="right" valign="top">
179 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_dict">source&nbsp;code</a></span>
180
181 </td>
182 </tr>
183 </table>
184
185 </td>
186 </tr>
187<tr class="private">
188 <td width="15%" align="right" valign="top" class="summary">
189 <span class="summary-type">&nbsp;</span>
190 </td><td class="summary">
191 <table width="100%" cellpadding="0" cellspacing="0" border="0">
192 <tr>
193 <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 />
194 Returns true if `el` is supposed to be a list.</td>
195 <td align="right" valign="top">
196 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_list">source&nbsp;code</a></span>
197
198 </td>
199 </tr>
200 </table>
201
202 </td>
203 </tr>
204<tr class="private">
205 <td width="15%" align="right" valign="top" class="summary">
206 <span class="summary-type">&nbsp;</span>
207 </td><td class="summary">
208 <table width="100%" cellpadding="0" cellspacing="0" border="0">
209 <tr>
210 <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>
211 <td align="right" valign="top">
212 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_str_to_datetime">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_boolean"></a><span class="summary-sig-name">_str_to_boolean</span>(<span class="summary-sig-arg">bool_str</span>)</span></td>
227 <td align="right" valign="top">
228 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_str_to_boolean">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="_from_xml"></a><span class="summary-sig-name">_from_xml</span>(<span class="summary-sig-arg">el</span>,
243 <span class="summary-sig-arg">strict</span>)</span><br />
244 Extracts value of xml element element `el`.</td>
245 <td align="right" valign="top">
246 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_from_xml">source&nbsp;code</a></span>
247
248 </td>
249 </tr>
250 </table>
251
252 </td>
253 </tr>
254<tr class="private">
255 <td width="15%" align="right" valign="top" class="summary">
256 <span class="summary-type">&nbsp;</span>
257 </td><td class="summary">
258 <table width="100%" cellpadding="0" cellspacing="0" border="0">
259 <tr>
260 <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 />
261 Converts `el.text` if `el` has attribute `type` with valid value.</td>
262 <td align="right" valign="top">
263 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_val_and_maybe_convert">source&nbsp;code</a></span>
264
265 </td>
266 </tr>
267 </table>
268
269 </td>
270 </tr>
271<tr class="private">
272 <td width="15%" align="right" valign="top" class="summary">
273 <span class="summary-type">&nbsp;</span>
274 </td><td class="summary">
275 <table width="100%" cellpadding="0" cellspacing="0" border="0">
276 <tr>
277 <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>,
278 <span class="summary-sig-arg">strict</span>)</span><br />
279 Converts xml elements list `el_list` to a python list.</td>
280 <td align="right" valign="top">
281 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_list_from_xml">source&nbsp;code</a></span>
282
283 </td>
284 </tr>
285 </table>
286
287 </td>
288 </tr>
289<tr class="private">
290 <td width="15%" align="right" valign="top" class="summary">
291 <span class="summary-type">&nbsp;</span>
292 </td><td class="summary">
293 <table width="100%" cellpadding="0" cellspacing="0" border="0">
294 <tr>
295 <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>,
296 <span class="summary-sig-arg">strict</span>)</span><br />
297 Converts xml doc with root `root` to a python dict.</td>
298 <td align="right" valign="top">
299 <span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_dict_from_xml">source&nbsp;code</a></span>
300
301 </td>
302 </tr>
303 </table>
304
305 </td>
306 </tr>
307</table>
308<!-- ==================== FUNCTION DETAILS ==================== -->
309<a name="section-FunctionDetails"></a>
310<table class="details" border="1" cellpadding="3"
311 cellspacing="0" width="100%" bgcolor="white">
312<tr bgcolor="#70b0f0" class="table-header">
313 <td colspan="2" class="table-header">
314 <table border="0" cellpadding="0" cellspacing="0" width="100%">
315 <tr valign="top">
316 <td align="left"><span class="table-header">Function Details</span></td>
317 <td align="right" valign="top"
318 ><span class="options">[<a href="#section-FunctionDetails"
319 class="privatelink" onclick="toggle_private();"
320 >hide private</a>]</span></td>
321 </tr>
322 </table>
323 </td>
324</tr>
325</table>
326<a name="_extract_attrs"></a>
327<div class="private">
328<table class="details" border="1" cellpadding="3"
329 cellspacing="0" width="100%" bgcolor="white">
330<tr><td>
331 <table width="100%" cellpadding="0" cellspacing="0" border="0">
332 <tr valign="top"><td>
333 <h3 class="epydoc"><span class="sig"><span class="sig-name">_extract_attrs</span>(<span class="sig-arg">els</span>)</span>
334 </h3>
335 </td><td align="right" valign="top"
336 ><span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_extract_attrs">source&nbsp;code</a></span>&nbsp;
337 </td>
338 </tr></table>
339
340 <p>Extracts attributes from dictionary `els`. Attributes are keys which
341 start with '@'</p>
342 <dl class="fields">
343 </dl>
344</td></tr></table>
345</div>
346<a name="_is_xml_el_dict"></a>
347<div class="private">
348<table class="details" border="1" cellpadding="3"
349 cellspacing="0" width="100%" bgcolor="white">
350<tr><td>
351 <table width="100%" cellpadding="0" cellspacing="0" border="0">
352 <tr valign="top"><td>
353 <h3 class="epydoc"><span class="sig"><span class="sig-name">_is_xml_el_dict</span>(<span class="sig-arg">el</span>)</span>
354 </h3>
355 </td><td align="right" valign="top"
356 ><span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_dict">source&nbsp;code</a></span>&nbsp;
357 </td>
358 </tr></table>
359
360 <p>Returns true if `el` is supposed to be a dict. This function makes
361 sense only in the context of making dicts out of xml.</p>
362 <dl class="fields">
363 </dl>
364</td></tr></table>
365</div>
366<a name="_is_xml_el_list"></a>
367<div class="private">
368<table class="details" border="1" cellpadding="3"
369 cellspacing="0" width="100%" bgcolor="white">
370<tr><td>
371 <table width="100%" cellpadding="0" cellspacing="0" border="0">
372 <tr valign="top"><td>
373 <h3 class="epydoc"><span class="sig"><span class="sig-name">_is_xml_el_list</span>(<span class="sig-arg">el</span>)</span>
374 </h3>
375 </td><td align="right" valign="top"
376 ><span class="codelink"><a href="TestON.core.xmldict-pysrc.html#_is_xml_el_list">source&nbsp;code</a></span>&nbsp;
377 </td>
378 </tr></table>
379
380 <p>Returns true if `el` is supposed to be a list. This function makes
381 sense only in the context of making lists out of xml.</p>
382 <dl class="fields">
383 </dl>
384</td></tr></table>
385</div>
386<br />
387<!-- ==================== NAVIGATION BAR ==================== -->
388<table class="navbar" border="0" width="100%" cellpadding="0"
389 bgcolor="#a0c0ff" cellspacing="0">
390 <tr valign="middle">
391 <!-- Home link -->
392 <th>&nbsp;&nbsp;&nbsp;<a
393 href="TestON-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
394
395 <!-- Tree link -->
396 <th>&nbsp;&nbsp;&nbsp;<a
397 href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
398
399 <!-- Index link -->
400 <th>&nbsp;&nbsp;&nbsp;<a
401 href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
402
403 <!-- Help link -->
404 <th>&nbsp;&nbsp;&nbsp;<a
405 href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
406
407 <th class="navbar" width="100%"></th>
408 </tr>
409</table>
410<table border="0" cellpadding="0" cellspacing="0" width="100%%">
411 <tr>
412 <td align="left" class="footer">
413 Generated by Epydoc 3.0.1 on Mon Mar 11 12:56:26 2013
414 </td>
415 <td align="right" class="footer">
416 <a target="mainFrame" href="http://epydoc.sourceforge.net"
417 >http://epydoc.sourceforge.net</a>
418 </td>
419 </tr>
420</table>
421
422<script type="text/javascript">
423 <!--
424 // Private objects are initially displayed (because if
425 // javascript is turned off then we want them to be
426 // visible); but by default, we want to hide them. So hide
427 // them unless we have a cookie that says to show them.
428 checkCookie();
429 // -->
430</script>
431</body>
432</html>