Return direct child of *element* having *child_tagname* or :class:`None` if no such child element is present.
(element, child_tagname)
| 29 | return element |
| 30 | |
| 31 | def _child(element, child_tagname): |
| 32 | """ |
| 33 | Return direct child of *element* having *child_tagname* or :class:`None` |
| 34 | if no such child element is present. |
| 35 | """ |
| 36 | xpath = './%s' % child_tagname |
| 37 | matching_children = element.xpath(xpath, namespaces=nsmap) |
| 38 | return matching_children[0] if len(matching_children) else None |
| 39 | |
| 40 | def _child_list(element, child_tagname): |
| 41 | """ |
no test coverage detected
searching dependent graphs…