|
| 1 | + |
1 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | 3 | <html><head><title>Python: module AdvancedHTMLParser.Tags</title> |
3 | | -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 4 | +<meta charset="utf-8"> |
4 | 5 | </head><body bgcolor="#f0f0f8"> |
5 | 6 |
|
6 | 7 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
|
28 | 29 |
|
29 | 30 | <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
30 | 31 | <td width="100%"><dl> |
31 | | -<dt><font face="helvetica, arial"><a href="builtins.html#list">builtins.list</a>(<a href="builtins.html#object">builtins.object</a>) |
| 32 | +<dt><font face="helvetica, arial"><a href="__builtin__.html#list">__builtin__.list</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
32 | 33 | </font></dt><dd> |
33 | 34 | <dl> |
34 | 35 | <dt><font face="helvetica, arial"><a href="AdvancedHTMLParser.Tags.html#TagCollection">TagCollection</a> |
35 | 36 | </font></dt></dl> |
36 | 37 | </dd> |
37 | | -<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a> |
| 38 | +<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
38 | 39 | </font></dt><dd> |
39 | 40 | <dl> |
40 | 41 | <dt><font face="helvetica, arial"><a href="AdvancedHTMLParser.Tags.html#AdvancedTag">AdvancedTag</a> |
|
45 | 46 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
46 | 47 | <tr bgcolor="#ffc8d8"> |
47 | 48 | <td colspan=3 valign=bottom> <br> |
48 | | -<font color="#000000" face="helvetica, arial"><a name="AdvancedTag">class <strong>AdvancedTag</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr> |
| 49 | +<font color="#000000" face="helvetica, arial"><a name="AdvancedTag">class <strong>AdvancedTag</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
49 | 50 |
|
50 | 51 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
51 | 52 | <td colspan=2><tt><a href="#AdvancedTag">AdvancedTag</a> - Represents a Tag. Used with AdvancedHTMLParser to create a DOM-model<br> |
|
57 | 58 | <td width="100%">Methods defined here:<br> |
58 | 59 | <dl><dt><a name="AdvancedTag-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt></dl> |
59 | 60 |
|
60 | | -<dl><dt><a name="AdvancedTag-__init__"><strong>__init__</strong></a>(self, tagName, attrList=None, isSelfClosing=False)</dt><dd><tt>__init__ - Construct<br> |
| 61 | +<dl><dt><a name="AdvancedTag-__init__"><strong>__init__</strong></a>(self, tagName, attrList<font color="#909090">=None</font>, isSelfClosing<font color="#909090">=False</font>)</dt><dd><tt>__init__ - Construct<br> |
61 | 62 | <br> |
62 | 63 | @param tagName - String of tag name. This will be lowercased!<br> |
63 | | - @param attrList - A <a href="builtins.html#list">list</a> of tuples (key, value)<br> |
| 64 | + @param attrList - A <a href="__builtin__.html#list">list</a> of tuples (key, value)<br> |
64 | 65 | @param isSelfClosing - True if self-closing tag ( <tagName attrs /> ) will be set to False if text or children are added.</tt></dd></dl> |
65 | 66 |
|
66 | 67 | <dl><dt><a name="AdvancedTag-__setattr__"><strong>__setattr__</strong></a>(self, name, value)</dt></dl> |
|
77 | 78 |
|
78 | 79 | <dl><dt><a name="AdvancedTag-appendText"><strong>appendText</strong></a>(self, text)</dt><dd><tt>appendText - append some inner text</tt></dd></dl> |
79 | 80 |
|
80 | | -<dl><dt><a name="AdvancedTag-getAttribute"><strong>getAttribute</strong></a>(self, attrName)</dt><dd><tt>getAttribute - Gets an attribute on this tag. Be wary using this for classname, maybe use addClass/removeClass. Attribute names are all lowercase.<br> |
| 81 | +<dl><dt><a name="AdvancedTag-getAttribute"><strong>getAttribute</strong></a>(self, attrName, defaultValue<font color="#909090">=None</font>)</dt><dd><tt>getAttribute - Gets an attribute on this tag. Be wary using this for classname, maybe use addClass/removeClass. Attribute names are all lowercase.<br> |
81 | 82 | @return - The attribute value, or None if none exists.</tt></dd></dl> |
82 | 83 |
|
83 | 84 | <dl><dt><a name="AdvancedTag-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>getChildren - returns child nodes as a searchable <a href="#TagCollection">TagCollection</a>.<br> |
|
150 | 151 | @return - None if no parent element (error condition), otherwise a <a href="#TagCollection">TagCollection</a> of peers that matched.</tt></dd></dl> |
151 | 152 |
|
152 | 153 | <dl><dt><a name="AdvancedTag-getPeersWithAttrValues"><strong>getPeersWithAttrValues</strong></a>(self, attrName, attrValues)</dt><dd><tt>getPeersWithAttrValues - Gets peers (elements on same level) whose attribute given by #attrName <br> |
153 | | - are in the <a href="builtins.html#list">list</a> of possible vaues #attrValues<br> |
| 154 | + are in the <a href="__builtin__.html#list">list</a> of possible vaues #attrValues<br> |
154 | 155 | <br> |
155 | 156 | @param attrName - Name of attribute<br> |
156 | 157 | @param attrValues - List of possible values which will match<br> |
|
301 | 302 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
302 | 303 | <tr bgcolor="#ffc8d8"> |
303 | 304 | <td colspan=3 valign=bottom> <br> |
304 | | -<font color="#000000" face="helvetica, arial"><a name="TagCollection">class <strong>TagCollection</strong></a>(<a href="builtins.html#list">builtins.list</a>)</font></td></tr> |
| 305 | +<font color="#000000" face="helvetica, arial"><a name="TagCollection">class <strong>TagCollection</strong></a>(<a href="__builtin__.html#list">__builtin__.list</a>)</font></td></tr> |
305 | 306 |
|
306 | 307 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
307 | | -<td colspan=2><tt>A collection of AdvancedTags. You may use this like a normal <a href="builtins.html#list">list</a>, or you can use the various getElements* functions within to operate on the results.<br> |
| 308 | +<td colspan=2><tt>A collection of AdvancedTags. You may use this like a normal <a href="__builtin__.html#list">list</a>, or you can use the various getElements* functions within to operate on the results.<br> |
308 | 309 | Generally, this is the return of all get* functions.<br> |
309 | 310 | <br> |
310 | 311 | All the get* functions called on a <a href="#TagCollection">TagCollection</a> search all contained elements and their childrens. If you need to check ONLY the elements in the tag collection, and not their children,<br> |
311 | | -either provide your own <a href="builtins.html#list">list</a> comprehension to do so, or use the "filterCollection" method, which takes an arbitrary function/lambda expression and filters just the immediate tags.<br> </tt></td></tr> |
| 312 | +either provide your own <a href="__builtin__.html#list">list</a> comprehension to do so, or use the "filterCollection" method, which takes an arbitrary function/lambda expression and filters just the immediate tags.<br> </tt></td></tr> |
312 | 313 | <tr><td> </td> |
313 | 314 | <td width="100%"><dl><dt>Method resolution order:</dt> |
314 | 315 | <dd><a href="AdvancedHTMLParser.Tags.html#TagCollection">TagCollection</a></dd> |
315 | | -<dd><a href="builtins.html#list">builtins.list</a></dd> |
316 | | -<dd><a href="builtins.html#object">builtins.object</a></dd> |
| 316 | +<dd><a href="__builtin__.html#list">__builtin__.list</a></dd> |
| 317 | +<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
317 | 318 | </dl> |
318 | 319 | <hr> |
319 | 320 | Methods defined here:<br> |
320 | 321 | <dl><dt><a name="TagCollection-__add__"><strong>__add__</strong></a>(self, others)</dt></dl> |
321 | 322 |
|
322 | | -<dl><dt><a name="TagCollection-__init__"><strong>__init__</strong></a>(self, values=None)</dt><dd><tt>Create this <a href="builtins.html#object">object</a>.<br> |
| 323 | +<dl><dt><a name="TagCollection-__init__"><strong>__init__</strong></a>(self, values<font color="#909090">=None</font>)</dt><dd><tt>Create this <a href="__builtin__.html#object">object</a>.<br> |
323 | 324 | <br> |
324 | 325 | @param values - Initial values, or None for empty</tt></dd></dl> |
325 | 326 |
|
326 | 327 | <dl><dt><a name="TagCollection-__sub__"><strong>__sub__</strong></a>(self, others)</dt></dl> |
327 | 328 |
|
328 | | -<dl><dt><a name="TagCollection-all"><strong>all</strong></a>(self)</dt><dd><tt>all - A plain <a href="builtins.html#list">list</a> of these elements<br> |
| 329 | +<dl><dt><a name="TagCollection-all"><strong>all</strong></a>(self)</dt><dd><tt>all - A plain <a href="__builtin__.html#list">list</a> of these elements<br> |
329 | 330 | <br> |
330 | 331 | @return - List of these elements</tt></dd></dl> |
331 | 332 |
|
|
0 commit comments