OfficeDoc Class
Properties Methods Events Configuration Settings Errors
The OfficeDoc class implements support for the Open XML Packaging Format used in Office 2007 documents.
Syntax
class ipworkszip.OfficeDoc
Remarks
The class provides a way to extract information and content from an Open XML packaged document, examine the package properties and basic read/update facilities.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
content_type_count | The number of records in the ContentType arrays. |
content_type_is_override | Specifies if this is a default content type or an override. |
content_type_media_type | The media type for this entry, as defined by RFC2616. |
content_type_target | If it's a default content type, this will be the file extension it applies to. |
namespace_count | The number of records in the Namespace arrays. |
namespace_prefix | The Prefix for the Namespace . |
namespace_uri | Namespace URI associated with the corresponding Prefix . |
package_path | The path to the Open XML package file. |
package_property_count | The number of records in the PackageProperty arrays. |
package_property_data_type | The data type associated with this property, if the information is available. |
package_property_name | The name of this property. |
package_property_namespace | The XML Namespace URI associated with this property. |
package_property_prop_id | If this is a custom property, this will be the pid assigned to it. |
package_property_prop_set | If this is a custom property, this will be the GUID of the property set it belongs to. |
package_property_value | The value of this property. |
part_data | The contents of the currently selected part. |
part_name | The name of the currently selected part. |
relationship_count | The number of records in the Relationship arrays. |
relationship_content_type | The content type for the part referenced by this relationship, resolved from [Content_Types]. |
relationship_id | The unique ID of this relationship within this . |
relationship_part_name | The name of the part this relationship entry applies to. |
relationship_type_uri | The XML namespace URI that specifies the meaning of this relationship. |
validate | When True, the parser checks that the document consists of well-formed XML. |
attr_count | The number of records in the Attr arrays. |
attr_name | The Name provides the local name (without prefix) of the attribute. |
attr_namespace | Attribute namespace. |
attr_prefix | Attribute prefix (if any). |
attr_value | Attribute value. |
x_child_count | The number of records in the XChild arrays. |
x_child_name | The Name property provides the local name (without prefix) of the element. |
x_child_namespace | Namespace of the element. |
x_child_prefix | Prefix of the element (if any). |
x_child_x_text | The inner text of the element. |
x_element | The name of the current element. |
x_namespace | The namespace of the current element. |
x_parent | The parent of the current element. |
x_path | Provides a way to point to a specific element in the document. |
x_prefix | The prefix of the current element. |
x_sub_tree | A snapshot of the current element in the document. |
x_text | The text of the current element. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
close | Closes the Open XML package archive. |
config | Sets or retrieves a configuration setting. |
extract_part | Reads the contents of the currently selected part. |
find_part_by_type | Looks up a part in the current relationships file by it's type namespace URI. |
get_property_value | Returns the value of the specified package property. |
list_parts | List all the parts contained in the document and their relationships. |
open | Opens the Open XML package archive. |
parse_part | Parses the specified part as XML. |
read_relationships | Reads the relationships file in the archive associated with the specified part. |
replace_part | Replaces the contents of the specified part in the package. |
reset | Resets the class. |
resolve_content_type | Returns the content type of the specified part. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_begin_file | Fired before each file is processed. |
on_characters | Fired for plain text segments of the input stream. |
on_comment | Fired when a comment section is encountered. |
on_end_element | Fired when an end-element tag is encountered. |
on_end_file | Fired after each file is processed. |
on_end_prefix_mapping | Fired when leaving the scope of a namespace declaration. |
on_error | Information about errors during data delivery. |
on_eval_entity | Fired every time an entity needs to be evaluated. |
on_ignorable_whitespace | Fired when a section of ignorable whitespace is encountered. |
on_meta | Fired when a meta section is encountered. |
on_overwrite | Fired whenever a file exists and may be overwritten. |
on_pi | Fired when a processing instruction section is encountered. |
on_progress | Fired as progress is made. |
on_special_section | Fired when a special section is encountered. |
on_start_element | Fired when a begin-element tag is encountered in the document. |
on_start_prefix_mapping | Fired when entering the scope of a namespace declaration. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
NormalizePartName | Whether to normalize Part Names. |
RelationshipIsExternal[x] | Whether the relationship part is internal or external. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |