paper-docxAPI referenceoxml.ns
NamespacePrefixedTag
paper-docx 0.2.0 API reference
Value object that knows the semantics of an XML tag having a namespace prefix.
NamespacePrefixedTag(nstag: str)Attributes
clark_name
attributeclark_namestrlocal_part
attributelocal_partstrThe local part of this tag.
E.g. "foobar" is returned for tag "f:foobar".
nsmap
attributensmapDict[str, str]Single-member dict mapping prefix of this tag to it's namespace name.
Example: {"f": "http://foo/bar"}. This is handy for passing to xpath calls
and other uses.
nspfx
attributenspfxstrThe namespace-prefix for this tag.
For example, "f" is returned for tag "f:foobar".
nsuri
attributensuristrThe namespace URI for this tag.
For example, "http://foo/bar" would be returned for tag "f:foobar" if the "f" prefix maps to "http://foo/bar" in nsmap.
Functions
from_clark_name
funcfrom_clark_name(clark_name: str) -> NamespacePrefixedTagparamclark_namestrReturns
docx.oxml.ns.NamespacePrefixedTag