IPWorks ZIP 2020 Python Edition

Questions / Feedback?

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_countThe number of records in the ContentType arrays.
content_type_is_overrideSpecifies if this is a default content type or an override.
content_type_media_typeThe media type for this entry, as defined by RFC2616.
content_type_targetIf it's a default content type, this will be the file extension it applies to.
namespace_countThe number of records in the Namespace arrays.
namespace_prefixThe Prefix for the Namespace .
namespace_uriNamespace URI associated with the corresponding Prefix .
package_pathThe path to the Open XML package file.
package_property_countThe number of records in the PackageProperty arrays.
package_property_data_typeThe data type associated with this property, if the information is available.
package_property_nameThe name of this property.
package_property_namespaceThe XML Namespace URI associated with this property.
package_property_prop_idIf this is a custom property, this will be the pid assigned to it.
package_property_prop_setIf this is a custom property, this will be the GUID of the property set it belongs to.
package_property_valueThe value of this property.
part_dataThe contents of the currently selected part.
part_nameThe name of the currently selected part.
relationship_countThe number of records in the Relationship arrays.
relationship_content_typeThe content type for the part referenced by this relationship, resolved from [Content_Types].
relationship_idThe unique ID of this relationship within this .
relationship_part_nameThe name of the part this relationship entry applies to.
relationship_type_uriThe XML namespace URI that specifies the meaning of this relationship.
validateWhen True, the parser checks that the document consists of well-formed XML.
attr_countThe number of records in the Attr arrays.
attr_nameThe Name provides the local name (without prefix) of the attribute.
attr_namespaceAttribute namespace.
attr_prefixAttribute prefix (if any).
attr_valueAttribute value.
x_child_countThe number of records in the XChild arrays.
x_child_nameThe Name property provides the local name (without prefix) of the element.
x_child_namespaceNamespace of the element.
x_child_prefixPrefix of the element (if any).
x_child_x_textThe inner text of the element.
x_elementThe name of the current element.
x_namespaceThe namespace of the current element.
x_parentThe parent of the current element.
x_pathProvides a way to point to a specific element in the document.
x_prefixThe prefix of the current element.
x_sub_treeA snapshot of the current element in the document.
x_textThe 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.

closeCloses the Open XML package archive.
configSets or retrieves a configuration setting.
extract_partReads the contents of the currently selected part.
find_part_by_typeLooks up a part in the current relationships file by it's type namespace URI.
get_property_valueReturns the value of the specified package property.
list_partsList all the parts contained in the document and their relationships.
openOpens the Open XML package archive.
parse_partParses the specified part as XML.
read_relationshipsReads the relationships file in the archive associated with the specified part.
replace_partReplaces the contents of the specified part in the package.
resetResets the class.
resolve_content_typeReturns 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_fileFired before each file is processed.
on_charactersFired for plain text segments of the input stream.
on_commentFired when a comment section is encountered.
on_end_elementFired when an end-element tag is encountered.
on_end_fileFired after each file is processed.
on_end_prefix_mappingFired when leaving the scope of a namespace declaration.
on_errorInformation about errors during data delivery.
on_eval_entityFired every time an entity needs to be evaluated.
on_ignorable_whitespaceFired when a section of ignorable whitespace is encountered.
on_metaFired when a meta section is encountered.
on_overwriteFired whenever a file exists and may be overwritten.
on_piFired when a processing instruction section is encountered.
on_progressFired as progress is made.
on_special_sectionFired when a special section is encountered.
on_start_elementFired when a begin-element tag is encountered in the document.
on_start_prefix_mappingFired 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.

NormalizePartNameWhether to normalize Part Names.
RelationshipIsExternal[x]Whether the relationship part is internal or external.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks ZIP 2020 Python Edition - Version 20.0 [Build 7720]