paper-docxAPI referenceopc.oxml
CT_Relationships
paper-docx 0.2.0 API reference
<Relationships> element, the root element in a .rels file.
Attributes
Relationship_lst
attributeRelationship_lstReturn a list containing all the <Relationship> child elements.
xml
attributexmlReturn XML string for this element, suitable for saving in a .rels stream, not pretty printed and with an XML declaration at the top.
Functions
add_rel
funcadd_rel(rId: str, reltype: str, target: str, is_external: bool = False)Add a child <Relationship> element with attributes set according to
parameter values.
paramrIdstrparamreltypestrparamtargetstrparamis_externalbool= Falsenew
funcnew() -> CT_RelationshipsReturn a new <Relationships> element.
Returns
docx.opc.oxml.CT_Relationships