Find first matching element by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found.
(self, path, namespaces=None)
| 274 | raise ValueError(f"{subelement!r} not in {self!r}") from None |
| 275 | |
| 276 | def find(self, path, namespaces=None): |
| 277 | """Find first matching element by tag name or path. |
| 278 | |
| 279 | *path* is a string having either an element tag or an XPath, |
| 280 | *namespaces* is an optional mapping from namespace prefix to full name. |
| 281 | |
| 282 | Return the first matching element, or None if no element was found. |
| 283 | |
| 284 | """ |
| 285 | return ElementPath.find(self, path, namespaces) |
| 286 | |
| 287 | def findtext(self, path, default=None, namespaces=None): |
| 288 | """Find text for first matching element by tag name or path. |
no outgoing calls