Match all elements that do not contain other elements:: >>> from pyquery import PyQuery >>> d = PyQuery(' title ') >>> d(':empty') [ ] ..
(self, xpath)
| 353 | return xpath |
| 354 | |
| 355 | def xpath_empty_pseudo(self, xpath): |
| 356 | """Match all elements that do not contain other elements:: |
| 357 | |
| 358 | >>> from pyquery import PyQuery |
| 359 | >>> d = PyQuery('<div><h1><span>title</span></h1><h2/></div>') |
| 360 | >>> d(':empty') |
| 361 | [<h2>] |
| 362 | |
| 363 | .. |
| 364 | """ |
| 365 | xpath.add_condition("not(node())") |
| 366 | return xpath |
| 367 | |
| 368 | def xpath_eq_function(self, xpath, function): |
| 369 | """Matches a single element by its index:: |
nothing calls this directly
no outgoing calls
no test coverage detected