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

Method new

src/docx/oxml/shared.py:48–52  ·  view source on GitHub ↗

A new `CT_String`` element with tagname `nsptagname` and `val` attribute set to `val`.

(cls, nsptagname: str, val: str)

Source from the content-addressed store, hash-verified

46
47 @classmethod
48 def new(cls, nsptagname: str, val: str):
49 """A new `CT_String`` element with tagname `nsptagname` and `val` attribute set to `val`."""
50 elm = cast(CT_String, OxmlElement(nsptagname))
51 elm.val = val
52 return elm

Callers

nothing calls this directly

Calls 1

OxmlElementFunction · 0.90

Tested by

no test coverage detected