Paper Office
paper-docxAPI referenceoxml.coreprops

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_textstr

The text in the dc:creator child element.

category

attributecategory
= ZeroOrOne('cp:category', successors=())

category_text

attributecategory_textstr

comments_text

attributecomments_textstr

contentStatus

attributecontentStatus
= ZeroOrOne('cp:contentStatus', successors=())

contentStatus_text

attributecontentStatus_textstr

created

attributecreated
= ZeroOrOne('dcterms:created', successors=())

created_datetime

attributecreated_datetimedt.datetime | None

creator

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_textstr

keywords

attributekeywords
= ZeroOrOne('cp:keywords', successors=())

keywords_text

attributekeywords_textstr

language

attributelanguage
= ZeroOrOne('dc:language', successors=())

language_text

attributelanguage_textstr

lastModifiedBy

attributelastModifiedBy
= ZeroOrOne('cp:lastModifiedBy', successors=())

lastModifiedBy_text

attributelastModifiedBy_textstr

lastPrinted

attributelastPrinted
= ZeroOrOne('cp:lastPrinted', successors=())

lastPrinted_datetime

attributelastPrinted_datetimedt.datetime | None

modified

attributemodified
= ZeroOrOne('dcterms:modified', successors=())

modified_datetime

attributemodified_datetimedt.datetime | None

revision

attributerevisionetree_Element | None
= ZeroOrOne('cp:revision', successors=())

revision_number

attributerevision_numberint

Integer value of revision property.

subject

attributesubject
= ZeroOrOne('dc:subject', successors=())

subject_text

attributesubject_textstr

title

attributetitle
= ZeroOrOne('dc:title', successors=())

title_text

attributetitle_textstr

version

attributeversion
= ZeroOrOne('cp:version', successors=())

version_text

attributeversion_textstr

xml

attributexmlstr

XML 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 | None

First child with tag in tagnames, or None if not found.

paramtagnamesstr
= ()

Returns

lxml.etree._Element | None

insert_element_before

funcinsert_element_before(elm: ElementBase, *tagnames: str)
paramelmElementBase
paramtagnamesstr
= ()

new

funcnew() -> CT_CoreProperties

Return a new <cp:coreProperties> element.

Returns

docx.oxml.coreprops.CT_CoreProperties

remove_all

funcremove_all(*tagnames: str) -> None

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

paramtagnamesstr
= ()

Returns

None

xpath

funcxpath(xpath_str: str) -> Any

Override of lxml _Element.xpath() method.

Provides standard Open XML namespace mapping (nsmap) in centralized location.

paramxpath_strstr

Returns

typing.Any

On this page