MCPcopy Index your code
hub / github.com/python-openxml/python-docx / first_child_found_in

Method first_child_found_in

src/docx/oxml/xmlchemy.py:656–662  ·  view source on GitHub ↗

First child with tag in `tagnames`, or None if not found.

(self, *tagnames: str)

Source from the content-addressed store, hash-verified

654 )
655
656 def first_child_found_in(self, *tagnames: str) -> _Element | None:
657 """First child with tag in `tagnames`, or None if not found."""
658 for tagname in tagnames:
659 child = self.find(qn(tagname))
660 if child is not None:
661 return child
662 return None
663
664 def insert_element_before(self, elm: ElementBase, *tagnames: str):
665 successor = self.first_child_found_in(*tagnames)

Calls 1

qnFunction · 0.90