MCPcopy Index your code
hub / github.com/python-openxml/python-docx / xml

Method xml

src/docx/opc/rel.py:62–68  ·  view source on GitHub ↗

Serialize this relationship collection into XML suitable for storage as a .rels file in an OPC package.

(self)

Source from the content-addressed store, hash-verified

60
61 @property
62 def xml(self) -> str:
63 """Serialize this relationship collection into XML suitable for storage as a
64 .rels file in an OPC package."""
65 rels_elm = CT_Relationships.new()
66 for rel in self.values():
67 rels_elm.add_rel(rel.rId, rel.reltype, rel.target_ref, rel.is_external)
68 return rels_elm.xml
69
70 def _get_matching(
71 self, reltype: str, target: Part | str, is_external: bool = False

Callers

nothing calls this directly

Calls 2

add_relMethod · 0.80
newMethod · 0.45

Tested by

no test coverage detected