extendedprops
extendedprops
¶
Custom element classes for extended (application) properties XML elements.
CT_ExtendedProperties
¶
Bases: BaseOxmlElement
<ep:Properties> element, the root element of the Extended Properties part.
Stored as /docProps/app.xml. These are the properties Word shows under
File > Info > Properties that are not Dublin Core, such as the word count and the
application that wrote the file.
CT_Properties is declared xsd:all rather than xsd:sequence, so child order
carries no meaning and every element is optional. Word writes them in its own order,
which is not the order they appear in the schema. New elements are therefore simply
appended, and no successors bookkeeping is needed.
new
classmethod
¶
new() -> CT_ExtendedProperties
text_of
¶
Text of the child element named property_name.
None when the element is absent, distinguishing "not recorded" from a value
that is genuinely the empty string.
Source code in src/docx/oxml/extendedprops.py
set_text_of
¶
Set the text of child element property_name, adding it if necessary.
Assigning None removes the element.
Source code in src/docx/oxml/extendedprops.py
int_of
¶
Integer value of child element property_name, or None if absent.
Returns None rather than raising when the recorded text is not a valid
integer; these values are written by other applications and a malformed count
should not make the whole document unreadable.
Source code in src/docx/oxml/extendedprops.py
bool_of
¶
Boolean value of child element property_name, or None if absent.