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

IPWorksZipOfficeDoc
IPWorksZipOfficeDocSwift

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.

- contentTypeCountThe number of records in the ContentType arrays.
- contentTypeIsOverride:(int)contentTypeIndexSpecifies if this is a default content type or an override.
- contentTypeMediaType:(int)contentTypeIndexThe media type for this entry, as defined by RFC2616.
- contentTypeTarget:(int)contentTypeIndexIf it's a default content type, this will be the file extension it applies to.
- namespaceCountThe number of records in the Namespace arrays.
- namespacePrefix:(int)namespaceIndexThe Prefix for the Namespace .
- namespaceURI:(int)namespaceIndexNamespace URI associated with the corresponding Prefix .
- packagePathThe path to the Open XML package file.
- packagePropertyCountThe number of records in the PackageProperty arrays.
- packagePropertyDataType:(int)packagePropertyIndexThe data type associated with this property, if the information is available.
- packagePropertyName:(int)packagePropertyIndexThe name of this property.
- packagePropertyNamespace:(int)packagePropertyIndexThe XML Namespace URI associated with this property.
- packagePropertyPropId:(int)packagePropertyIndexIf this is a custom property, this will be the pid assigned to it.
- packagePropertyPropSet:(int)packagePropertyIndexIf this is a custom property, this will be the GUID of the property set it belongs to.
- packagePropertyValue:(int)packagePropertyIndexThe value of this property.
- partDataThe contents of the currently selected part.
- partNameThe name of the currently selected part.
- relationshipCountThe number of records in the Relationship arrays.
- relationshipContentType:(int)relationshipIndexThe content type for the part referenced by this relationship, resolved from [Content_Types].
- relationshipId:(int)relationshipIndexThe unique ID of this relationship within this .
- relationshipPartName:(int)relationshipIndexThe name of the part this relationship entry applies to.
- relationshipTypeURI:(int)relationshipIndexThe XML namespace URI that specifies the meaning of this relationship.
- validateWhen True, the parser checks that the document consists of well-formed XML.
- attrCountThe number of records in the Attr arrays.
- attrName:(int)attrIndexThe Name provides the local name (without prefix) of the attribute.
- attrNamespace:(int)attrIndexAttribute namespace.
- attrPrefix:(int)attrIndexAttribute prefix (if any).
- attrValue:(int)attrIndexAttribute value.
- XChildCountThe number of records in the XChild arrays.
- XChildName:(int)xChildIndexThe Name property provides the local name (without prefix) of the element.
- XChildNamespace:(int)xChildIndexNamespace of the element.
- XChildPrefix:(int)xChildIndexPrefix of the element (if any).
- XChildXText:(int)xChildIndexThe inner text of the element.
- XElementThe name of the current element.
- XNamespaceThe namespace of the current element.
- XParentThe parent of the current element.
- XPathProvides a way to point to a specific element in the document.
- XPrefixThe prefix of the current element.
- XSubTreeA snapshot of the current element in the document.
- XTextThe 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.
- extractPartReads the contents of the currently selected part.
- findPartByTypeLooks up a part in the current relationships file by it's type namespace URI.
- getPropertyValueReturns the value of the specified package property.
- listPartsList all the parts contained in the document and their relationships.
- openOpens the Open XML package archive.
- parsePartParses the specified part as XML.
- readRelationshipsReads the relationships file in the archive associated with the specified part.
- replacePartReplaces the contents of the specified part in the package.
- resetResets the class.
- resolveContentTypeReturns 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.

- onBeginFileFired before each file is processed.
- onCharactersFired for plain text segments of the input stream.
- onCommentFired when a comment section is encountered.
- onEndElementFired when an end-element tag is encountered.
- onEndFileFired after each file is processed.
- onEndPrefixMappingFired when leaving the scope of a namespace declaration.
- onErrorInformation about errors during data delivery.
- onEvalEntityFired every time an entity needs to be evaluated.
- onIgnorableWhitespaceFired when a section of ignorable whitespace is encountered.
- onMetaFired when a meta section is encountered.
- onOverwriteFired whenever a file exists and may be overwritten.
- onPIFired when a processing instruction section is encountered.
- onProgressFired as progress is made.
- onSpecialSectionFired when a special section is encountered.
- onStartElementFired when a begin-element tag is encountered in the document.
- onStartPrefixMappingFired 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) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 iOS Edition - Version 20.0 [Build 8300]