CT_CoreProperties
paper-docx 0.2.0 API reference
<cp:coreProperties> element, the root element of the Core Properties part.
Stored as /docProps/core.xml. Implements many of the Dublin Core document metadata
elements. String elements resolve to an empty string ("") if the element is not
present in the XML. String elements are limited in length to 255 unicode characters.
Attributes
author_text
attributeauthor_textstrThe text in the dc:creator child element.
category
attributecategory= ZeroOrOne('cp:category', successors=())category_text
attributecategory_textstrcomments_text
attributecomments_textstrcontentStatus
attributecontentStatus= ZeroOrOne('cp:contentStatus', successors=())contentStatus_text
attributecontentStatus_textstrcreated
attributecreated= ZeroOrOne('dcterms:created', successors=())created_datetime
attributecreated_datetimedt.datetime | Nonecreator
attributecreator= ZeroOrOne('dc:creator', successors=())description
attributedescription= ZeroOrOne('dc:description', successors=())get_or_add_revision
attributeget_or_add_revisionCallable[[], etree_Element]identifier
attributeidentifier= ZeroOrOne('dc:identifier', successors=())identifier_text
attributeidentifier_textstrkeywords
attributekeywords= ZeroOrOne('cp:keywords', successors=())keywords_text
attributekeywords_textstrlanguage
attributelanguage= ZeroOrOne('dc:language', successors=())language_text
attributelanguage_textstrlastModifiedBy
attributelastModifiedBy= ZeroOrOne('cp:lastModifiedBy', successors=())lastModifiedBy_text
attributelastModifiedBy_textstrlastPrinted
attributelastPrinted= ZeroOrOne('cp:lastPrinted', successors=())lastPrinted_datetime
attributelastPrinted_datetimedt.datetime | Nonemodified
attributemodified= ZeroOrOne('dcterms:modified', successors=())modified_datetime
attributemodified_datetimedt.datetime | Nonerevision
attributerevisionetree_Element | None= ZeroOrOne('cp:revision', successors=())revision_number
attributerevision_numberintInteger value of revision property.
subject
attributesubject= ZeroOrOne('dc:subject', successors=())subject_text
attributesubject_textstrtitle
attributetitle= ZeroOrOne('dc:title', successors=())title_text
attributetitle_textstrversion
attributeversion= ZeroOrOne('cp:version', successors=())version_text
attributeversion_textstrxml
attributexmlstrXML string for this element, suitable for testing purposes.
Pretty printed for readability and without an XML declaration at the top.
Functions
first_child_found_in
funcfirst_child_found_in(*tagnames: str) -> _Element | NoneFirst child with tag in tagnames, or None if not found.
paramtagnamesstr= ()Returns
lxml.etree._Element | Noneinsert_element_before
funcinsert_element_before(elm: ElementBase, *tagnames: str)paramelmElementBaseparamtagnamesstr= ()new
funcnew() -> CT_CorePropertiesReturn a new <cp:coreProperties> element.
Returns
docx.oxml.coreprops.CT_CorePropertiesremove_all
funcremove_all(*tagnames: str) -> NoneRemove child elements with tagname (e.g. "a:p") in tagnames.
paramtagnamesstr= ()Returns
Nonexpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any