1 <?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">
6 <title>lxml.etree._IDDict</title>
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
18 <th> <a
19 href="lxml-module.html">Home</a> </th>
22 <th> <a
23 href="module-tree.html">Trees</a> </th>
26 <th> <a
27 href="identifier-index.html">Indices</a> </th>
30 <th> <a
31 href="help.html">Help</a> </th>
33 <!-- 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 ><a class="navbar" target="_top" href="/">lxml API</a></th>
41 <table width="100%" cellpadding="0" cellspacing="0">
44 <span class="breadcrumbs">
45 <a href="lxml-module.html">Package lxml</a> ::
46 <a href="lxml.etree-module.html">Module etree</a> ::
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 private</a>]</span></td></tr>
55 <tr><td align="right"><span class="options"
56 >[<a href="frames.html" target="_top">frames</a
57 >] | <a href="lxml.etree._IDDict-class.html"
58 target="_top">no frames</a>]</span></td></tr>
63 <!-- ==================== CLASS DESCRIPTION ==================== -->
64 <h1 class="epydoc">Class _IDDict</h1><p class="nomargin-top"></p>
65 <pre class="base-tree">
68 <strong class="uidshort">_IDDict</strong>
72 <p>IDDict(self, etree)
73 A dictionary-like proxy class that mapps ID attributes to elements.</p>
74 <p>The dictionary must be instantiated with the root element of a parsed XML
75 document, otherwise the behaviour is undefined. Elements and XML trees
76 that were created or modified 'by hand' are not supported.</p>
78 <!-- ==================== INSTANCE METHODS ==================== -->
79 <a name="section-InstanceMethods"></a>
80 <table class="summary" border="1" cellpadding="3"
81 cellspacing="0" width="100%" bgcolor="white">
82 <tr bgcolor="#70b0f0" class="table-header">
83 <td colspan="2" class="table-header">
84 <table border="0" cellpadding="0" cellspacing="0" width="100%">
86 <td align="left"><span class="table-header">Instance Methods</span></td>
87 <td align="right" valign="top"
88 ><span class="options">[<a href="#section-InstanceMethods"
89 class="privatelink" onclick="toggle_private();"
90 >hide private</a>]</span></td>
96 <td width="15%" align="right" valign="top" class="summary">
97 <span class="summary-type"> </span>
98 </td><td class="summary">
99 <table width="100%" cellpadding="0" cellspacing="0" border="0">
101 <td><span class="summary-sig"><a name="__contains__"></a><span class="summary-sig-name">__contains__</span>(<span class="summary-sig-arg">x</span>,
102 <span class="summary-sig-arg">y</span>)</span><br />
104 <td align="right" valign="top">
114 <td width="15%" align="right" valign="top" class="summary">
115 <span class="summary-type"> </span>
116 </td><td class="summary">
117 <table width="100%" cellpadding="0" cellspacing="0" border="0">
119 <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">x</span>,
120 <span class="summary-sig-arg">y</span>)</span><br />
122 <td align="right" valign="top">
132 <td width="15%" align="right" valign="top" class="summary">
133 <span class="summary-type"> </span>
134 </td><td class="summary">
135 <table width="100%" cellpadding="0" cellspacing="0" border="0">
137 <td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">x</span>)</span><br />
139 <td align="right" valign="top">
149 <td width="15%" align="right" valign="top" class="summary">
150 <span class="summary-type"> </span>
151 </td><td class="summary">
152 <table width="100%" cellpadding="0" cellspacing="0" border="0">
154 <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">x</span>)</span><br />
156 <td align="right" valign="top">
166 <td width="15%" align="right" valign="top" class="summary">
167 <span class="summary-type">a new object with type S, a subtype of T</span>
168 </td><td class="summary">
169 <table width="100%" cellpadding="0" cellspacing="0" border="0">
171 <td><span class="summary-sig"><a href="lxml.etree._IDDict-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
172 <span class="summary-sig-arg">S</span>,
173 <span class="summary-sig-arg">...</span>)</span></td>
174 <td align="right" valign="top">
184 <td width="15%" align="right" valign="top" class="summary">
185 <span class="summary-type"> </span>
186 </td><td class="summary">
187 <table width="100%" cellpadding="0" cellspacing="0" border="0">
189 <td><span class="summary-sig"><a href="lxml.etree._IDDict-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
191 <td align="right" valign="top">
201 <td width="15%" align="right" valign="top" class="summary">
202 <span class="summary-type"> </span>
203 </td><td class="summary">
204 <table width="100%" cellpadding="0" cellspacing="0" border="0">
206 <td><span class="summary-sig"><a name="copy"></a><span class="summary-sig-name">copy</span>(<span class="summary-sig-arg">...</span>)</span></td>
207 <td align="right" valign="top">
217 <td width="15%" align="right" valign="top" class="summary">
218 <span class="summary-type"> </span>
219 </td><td class="summary">
220 <table width="100%" cellpadding="0" cellspacing="0" border="0">
222 <td><span class="summary-sig"><a name="get"></a><span class="summary-sig-name">get</span>(<span class="summary-sig-arg">...</span>)</span></td>
223 <td align="right" valign="top">
233 <td width="15%" align="right" valign="top" class="summary">
234 <span class="summary-type"> </span>
235 </td><td class="summary">
236 <table width="100%" cellpadding="0" cellspacing="0" border="0">
238 <td><span class="summary-sig"><a name="has_key"></a><span class="summary-sig-name">has_key</span>(<span class="summary-sig-arg">...</span>)</span></td>
239 <td align="right" valign="top">
249 <td width="15%" align="right" valign="top" class="summary">
250 <span class="summary-type"> </span>
251 </td><td class="summary">
252 <table width="100%" cellpadding="0" cellspacing="0" border="0">
254 <td><span class="summary-sig"><a name="items"></a><span class="summary-sig-name">items</span>(<span class="summary-sig-arg">...</span>)</span></td>
255 <td align="right" valign="top">
265 <td width="15%" align="right" valign="top" class="summary">
266 <span class="summary-type"> </span>
267 </td><td class="summary">
268 <table width="100%" cellpadding="0" cellspacing="0" border="0">
270 <td><span class="summary-sig"><a name="iteritems"></a><span class="summary-sig-name">iteritems</span>(<span class="summary-sig-arg">...</span>)</span></td>
271 <td align="right" valign="top">
281 <td width="15%" align="right" valign="top" class="summary">
282 <span class="summary-type"> </span>
283 </td><td class="summary">
284 <table width="100%" cellpadding="0" cellspacing="0" border="0">
286 <td><span class="summary-sig"><a name="iterkeys"></a><span class="summary-sig-name">iterkeys</span>(<span class="summary-sig-arg">...</span>)</span></td>
287 <td align="right" valign="top">
297 <td width="15%" align="right" valign="top" class="summary">
298 <span class="summary-type"> </span>
299 </td><td class="summary">
300 <table width="100%" cellpadding="0" cellspacing="0" border="0">
302 <td><span class="summary-sig"><a name="itervalues"></a><span class="summary-sig-name">itervalues</span>(<span class="summary-sig-arg">...</span>)</span></td>
303 <td align="right" valign="top">
313 <td width="15%" align="right" valign="top" class="summary">
314 <span class="summary-type"> </span>
315 </td><td class="summary">
316 <table width="100%" cellpadding="0" cellspacing="0" border="0">
318 <td><span class="summary-sig"><a name="keys"></a><span class="summary-sig-name">keys</span>(<span class="summary-sig-arg">...</span>)</span></td>
319 <td align="right" valign="top">
329 <td width="15%" align="right" valign="top" class="summary">
330 <span class="summary-type"> </span>
331 </td><td class="summary">
332 <table width="100%" cellpadding="0" cellspacing="0" border="0">
334 <td><span class="summary-sig"><a name="values"></a><span class="summary-sig-name">values</span>(<span class="summary-sig-arg">...</span>)</span></td>
335 <td align="right" valign="top">
345 <td colspan="2" class="summary">
346 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
347 <code>__delattr__</code>,
348 <code>__format__</code>,
349 <code>__getattribute__</code>,
350 <code>__hash__</code>,
351 <code>__init__</code>,
352 <code>__reduce__</code>,
353 <code>__reduce_ex__</code>,
354 <code>__setattr__</code>,
355 <code>__sizeof__</code>,
356 <code>__str__</code>,
357 <code>__subclasshook__</code>
362 <!-- ==================== PROPERTIES ==================== -->
363 <a name="section-Properties"></a>
364 <table class="summary" border="1" cellpadding="3"
365 cellspacing="0" width="100%" bgcolor="white">
366 <tr bgcolor="#70b0f0" class="table-header">
367 <td colspan="2" class="table-header">
368 <table border="0" cellpadding="0" cellspacing="0" width="100%">
370 <td align="left"><span class="table-header">Properties</span></td>
371 <td align="right" valign="top"
372 ><span class="options">[<a href="#section-Properties"
373 class="privatelink" onclick="toggle_private();"
374 >hide private</a>]</span></td>
380 <td colspan="2" class="summary">
381 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
382 <code>__class__</code>
387 <!-- ==================== METHOD DETAILS ==================== -->
388 <a name="section-MethodDetails"></a>
389 <table class="details" border="1" cellpadding="3"
390 cellspacing="0" width="100%" bgcolor="white">
391 <tr bgcolor="#70b0f0" class="table-header">
392 <td colspan="2" class="table-header">
393 <table border="0" cellpadding="0" cellspacing="0" width="100%">
395 <td align="left"><span class="table-header">Method Details</span></td>
396 <td align="right" valign="top"
397 ><span class="options">[<a href="#section-MethodDetails"
398 class="privatelink" onclick="toggle_private();"
399 >hide private</a>]</span></td>
405 <a name="__new__"></a>
407 <table class="details" border="1" cellpadding="3"
408 cellspacing="0" width="100%" bgcolor="white">
410 <table width="100%" cellpadding="0" cellspacing="0" border="0">
411 <tr valign="top"><td>
412 <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
413 <span class="sig-arg">S</span>,
414 <span class="sig-arg">...</span>)</span>
416 </td><td align="right" valign="top"
423 <dt>Returns: a new object with type S, a subtype of T</dt>
430 <a name="__repr__"></a>
432 <table class="details" border="1" cellpadding="3"
433 cellspacing="0" width="100%" bgcolor="white">
435 <table width="100%" cellpadding="0" cellspacing="0" border="0">
436 <tr valign="top"><td>
437 <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
438 <br /><em class="fname">(Representation operator)</em>
440 </td><td align="right" valign="top"
454 <!-- ==================== NAVIGATION BAR ==================== -->
455 <table class="navbar" border="0" width="100%" cellpadding="0"
456 bgcolor="#a0c0ff" cellspacing="0">
459 <th> <a
460 href="lxml-module.html">Home</a> </th>
463 <th> <a
464 href="module-tree.html">Trees</a> </th>
467 <th> <a
468 href="identifier-index.html">Indices</a> </th>
471 <th> <a
472 href="help.html">Help</a> </th>
474 <!-- Project homepage -->
475 <th class="navbar" align="right" width="100%">
476 <table border="0" cellpadding="0" cellspacing="0">
477 <tr><th class="navbar" align="center"
478 ><a class="navbar" target="_top" href="/">lxml API</a></th>
482 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
484 <td align="left" class="footer">
485 Generated by Epydoc 3.0.1
486 on Thu Jul 9 18:29:53 2020
488 <td align="right" class="footer">
489 <a target="mainFrame" href="http://epydoc.sourceforge.net"
490 >http://epydoc.sourceforge.net</a>
495 <script type="text/javascript">
497 // Private objects are initially displayed (because if
498 // javascript is turned off then we want them to be
499 // visible); but by default, we want to hide them. So hide
500 // them unless we have a cookie that says to show them.