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

Method remove_all

src/docx/oxml/xmlchemy.py:672–677  ·  view source on GitHub ↗

Remove child elements with tagname (e.g. "a:p") in `tagnames`.

(self, *tagnames: str)

Source from the content-addressed store, hash-verified

670 return elm
671
672 def remove_all(self, *tagnames: str) -> None:
673 """Remove child elements with tagname (e.g. "a:p") in `tagnames`."""
674 for tagname in tagnames:
675 matching = self.findall(qn(tagname))
676 for child in matching:
677 self.remove(child)
678
679 @property
680 def xml(self) -> str:

Calls 1

qnFunction · 0.90