|
356 | 356 | <br /> |
357 | 357 | @return - <a href="#TagCollection" >TagCollection</a> of all matching elements</tt></dd></dl> |
358 | 358 |
|
| 359 | +<dl ><dt ><a name="AdvancedHTMLParser-getFirstElementCustomFilter" ><strong >getFirstElementCustomFilter</strong></a>(self, filterFunc, root='root')</dt><dd ><tt >getFirstElementCustomFilter - Scan elements using a provided function, stop and return the first match.<br /> |
| 360 | + <br /> |
| 361 | + @see getElementsCustomFilter to match multiple elements<br /> |
| 362 | + <br /> |
| 363 | +@param filterFunc <function>(node) - A function that takes an <a href="#AdvancedTag" >AdvancedTag</a> as an argument, and returns True if some arbitrary criteria is met<br /> |
| 364 | + <br /> |
| 365 | +@return - An <a href="#AdvancedTag" >AdvancedTag</a> of the node that matched, or None if no match.</tt></dd></dl> |
| 366 | + |
359 | 367 | <dl ><dt ><a name="AdvancedHTMLParser-getFormattedHTML" ><strong >getFormattedHTML</strong></a>(self, indent=' ')</dt><dd ><tt >getFormattedHTML - Get formatted and xhtml of this document<br /> |
360 | 368 | <br /> |
361 | 369 | @param indent - space/tab/newline of each level of indent, or integer for how many spaces per level<br /> |
|
455 | 463 | <br /> |
456 | 464 | Also, if you are just appending to an existing tag, use <a href="#AdvancedTag" >AdvancedTag</a>.appendInnerHTML</tt></dd></dl> |
457 | 465 |
|
| 466 | +<hr /> |
| 467 | +Data descriptors defined here:<br /> |
| 468 | +<dl ><dt ><strong >body</strong></dt> |
| 469 | +</dl> |
| 470 | +<dl ><dt ><strong >head</strong></dt> |
| 471 | +</dl> |
458 | 472 | <hr /> |
459 | 473 | Methods inherited from <a href="html.parser.html#HTMLParser" >html.parser.HTMLParser</a>:<br /> |
460 | 474 | <dl ><dt ><a name="AdvancedHTMLParser-check_for_whole_start_tag" ><strong >check_for_whole_start_tag</strong></a>(self, i)</dt><dd ><tt ># Internal -- check to see if we have a complete starttag; return end<br /> |
|
724 | 738 | <br /> |
725 | 739 | @param filterFunc <function> - A function or lambda expression that should return "True" if the passed node matches criteria.<br /> |
726 | 740 | <br /> |
727 | | -@return - <a href="#TagCollection" >TagCollection</a> of matching results</tt></dd></dl> |
| 741 | +@return - <a href="#TagCollection" >TagCollection</a> of matching results<br /> |
| 742 | + <br /> |
| 743 | +@see getFirstElementCustomFilter</tt></dd></dl> |
728 | 744 |
|
729 | 745 | <dl ><dt ><a name="AdvancedTag-getElementsWithAttrValues" ><strong >getElementsWithAttrValues</strong></a>(self, attrName, attrValues)</dt><dd ><tt >getElementsWithAttrValues - Search children of this tag for tags with an attribute name and one of several values<br /> |
730 | 746 | <br /> |
|
737 | 753 | <br /> |
738 | 754 | @return - String of end tag</tt></dd></dl> |
739 | 755 |
|
| 756 | +<dl ><dt ><a name="AdvancedTag-getFirstElementCustomFilter" ><strong >getFirstElementCustomFilter</strong></a>(self, filterFunc)</dt><dd ><tt >getFirstElementCustomFilter - Gets the first element which matches a given filter func.<br /> |
| 757 | + <br /> |
| 758 | + Scans first child, to the bottom, then next child to the bottom, etc. Does not include "self" node.<br /> |
| 759 | + <br /> |
| 760 | +@param filterFunc <function> - A function or lambda expression that should return "True" if the passed node matches criteria.<br /> |
| 761 | + <br /> |
| 762 | +@return <<a href="#AdvancedTag" >AdvancedTag</a>/None> - First match, or None<br /> |
| 763 | + <br /> |
| 764 | +@see getElementsCustomFilter</tt></dd></dl> |
| 765 | + |
740 | 766 | <dl ><dt ><a name="AdvancedTag-getPeers" ><strong >getPeers</strong></a>(self)</dt><dd ><tt >getPeers - Get elements who share a parent with this element<br /> |
741 | 767 | <br /> |
742 | 768 | @return - <a href="#TagCollection" >TagCollection</a> of elements</tt></dd></dl> |
|
1248 | 1274 | <br /> |
1249 | 1275 | @return - <a href="#TagCollection" >TagCollection</a> of all matching elements</tt></dd></dl> |
1250 | 1276 |
|
| 1277 | +<dl ><dt ><a name="IndexedAdvancedHTMLParser-getFirstElementCustomFilter" ><strong >getFirstElementCustomFilter</strong></a>(self, filterFunc, root='root')</dt><dd ><tt >getFirstElementCustomFilter - Scan elements using a provided function, stop and return the first match.<br /> |
| 1278 | + <br /> |
| 1279 | + @see getElementsCustomFilter to match multiple elements<br /> |
| 1280 | + <br /> |
| 1281 | +@param filterFunc <function>(node) - A function that takes an <a href="#AdvancedTag" >AdvancedTag</a> as an argument, and returns True if some arbitrary criteria is met<br /> |
| 1282 | + <br /> |
| 1283 | +@return - An <a href="#AdvancedTag" >AdvancedTag</a> of the node that matched, or None if no match.</tt></dd></dl> |
| 1284 | + |
1251 | 1285 | <dl ><dt ><a name="IndexedAdvancedHTMLParser-getFormattedHTML" ><strong >getFormattedHTML</strong></a>(self, indent=' ')</dt><dd ><tt >getFormattedHTML - Get formatted and xhtml of this document<br /> |
1252 | 1286 | <br /> |
1253 | 1287 | @param indent - space/tab/newline of each level of indent, or integer for how many spaces per level<br /> |
|
1343 | 1377 | <br /> |
1344 | 1378 | Also, if you are just appending to an existing tag, use <a href="#AdvancedTag" >AdvancedTag</a>.appendInnerHTML</tt></dd></dl> |
1345 | 1379 |
|
| 1380 | +<hr /> |
| 1381 | +Data descriptors inherited from <a href="AdvancedHTMLParser.Parser.html#AdvancedHTMLParser" >AdvancedHTMLParser</a>:<br /> |
| 1382 | +<dl ><dt ><strong >body</strong></dt> |
| 1383 | +</dl> |
| 1384 | +<dl ><dt ><strong >head</strong></dt> |
| 1385 | +</dl> |
1346 | 1386 | <hr /> |
1347 | 1387 | Methods inherited from <a href="html.parser.html#HTMLParser" >html.parser.HTMLParser</a>:<br /> |
1348 | 1388 | <dl ><dt ><a name="IndexedAdvancedHTMLParser-check_for_whole_start_tag" ><strong >check_for_whole_start_tag</strong></a>(self, i)</dt><dd ><tt ># Internal -- check to see if we have a complete starttag; return end<br /> |
|
2161 | 2201 | <br /> |
2162 | 2202 | @return - <a href="#TagCollection" >TagCollection</a> of all matching elements</tt></dd></dl> |
2163 | 2203 |
|
| 2204 | +<dl ><dt ><a name="ValidatingAdvancedHTMLParser-getFirstElementCustomFilter" ><strong >getFirstElementCustomFilter</strong></a>(self, filterFunc, root='root')</dt><dd ><tt >getFirstElementCustomFilter - Scan elements using a provided function, stop and return the first match.<br /> |
| 2205 | + <br /> |
| 2206 | + @see getElementsCustomFilter to match multiple elements<br /> |
| 2207 | + <br /> |
| 2208 | +@param filterFunc <function>(node) - A function that takes an <a href="#AdvancedTag" >AdvancedTag</a> as an argument, and returns True if some arbitrary criteria is met<br /> |
| 2209 | + <br /> |
| 2210 | +@return - An <a href="#AdvancedTag" >AdvancedTag</a> of the node that matched, or None if no match.</tt></dd></dl> |
| 2211 | + |
2164 | 2212 | <dl ><dt ><a name="ValidatingAdvancedHTMLParser-getFormattedHTML" ><strong >getFormattedHTML</strong></a>(self, indent=' ')</dt><dd ><tt >getFormattedHTML - Get formatted and xhtml of this document<br /> |
2165 | 2213 | <br /> |
2166 | 2214 | @param indent - space/tab/newline of each level of indent, or integer for how many spaces per level<br /> |
|
2258 | 2306 | <br /> |
2259 | 2307 | Also, if you are just appending to an existing tag, use <a href="#AdvancedTag" >AdvancedTag</a>.appendInnerHTML</tt></dd></dl> |
2260 | 2308 |
|
| 2309 | +<hr /> |
| 2310 | +Data descriptors inherited from <a href="AdvancedHTMLParser.Parser.html#AdvancedHTMLParser" >AdvancedHTMLParser.Parser.AdvancedHTMLParser</a>:<br /> |
| 2311 | +<dl ><dt ><strong >body</strong></dt> |
| 2312 | +</dl> |
| 2313 | +<dl ><dt ><strong >head</strong></dt> |
| 2314 | +</dl> |
2261 | 2315 | <hr /> |
2262 | 2316 | Methods inherited from <a href="html.parser.html#HTMLParser" >html.parser.HTMLParser</a>:<br /> |
2263 | 2317 | <dl ><dt ><a name="ValidatingAdvancedHTMLParser-check_for_whole_start_tag" ><strong >check_for_whole_start_tag</strong></a>(self, i)</dt><dd ><tt ># Internal -- check to see if we have a complete starttag; return end<br /> |
|
0 commit comments