An OOXML Document.
A OOXML document.
Variables: |
|
---|
Initialize attributes. Build collections of Parts and Relationships. Parse and provide access to Features and CoreProperties.
Parameters: | filepath (string) – the path to the document file |
---|
Determine list of all Relationships where reltype matches the end of the Relationship Type.
For example:
>>> rel = doc.find_relationship_by_type('ships/officeDocument')
>>> rel[0].type
'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument'
Parameters: | reltype (string) – Relationship type. Match the end of reltype. |
---|---|
Returns: | list of all Relationships with reltype matching the end of reltype |
Determines list of all Parts with a given content-type.
Parameters: | contype (string) – content-type |
---|---|
Returns: | list of all Parts with content-type |
Determine list of all Parts with content-type matching regex.
Parameters: | exp (string) – regular expression to match content-type of parts |
---|---|
Returns: | list of all Parts with content-type matching regex |
Determine list of all Parts with incoming Relationships where reltype matches the end of the Relationship Type.
For example:
>>> part = doc.parts_by_relationship_type('ships/officeDocument')
>>> print part[0]
[Part [/word/document.xml]]
>>> part[0].relationships_in()[0].type
'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument'.
Parameters: | reltype (string) – Relationship type. Match the end of reltype. |
---|---|
Returns: | list of all Parts with reltype matching the end of the Relationship type |
Export this object to JSON
Parameters: | include_stream (bool) – Optional - Include base64 encoded stream of all Parts (Default false). |
---|---|
Returns: | a JSON encoded string |
Return a Zip object of OOXML located at self.filepath.
Returns: | Zip object |
---|