OfficeDoc Class

Properties   Methods   Events   Configuration Settings   Errors  

The OfficeDoc class implements support for the Open XML Packaging Format used in Office 2007 documents.

Class Name

IPWorksZip_OfficeDoc

Procedural Interface

 ipworkszip_officedoc_open();
 ipworkszip_officedoc_close($res);
 ipworkszip_officedoc_register_callback($res, $id, $function);
 ipworkszip_officedoc_get_last_error($res);
 ipworkszip_officedoc_get_last_error_code($res);
 ipworkszip_officedoc_set($res, $id, $index, $value);
 ipworkszip_officedoc_get($res, $id, $index);
 ipworkszip_officedoc_do_close($res);
 ipworkszip_officedoc_do_config($res, $configurationstring);
 ipworkszip_officedoc_do_extractpart($res);
 ipworkszip_officedoc_do_findpartbytype($res, $typeuri);
 ipworkszip_officedoc_do_getpropertyvalue($res, $propname, $propnamespace);
 ipworkszip_officedoc_do_listparts($res);
 ipworkszip_officedoc_do_open($res);
 ipworkszip_officedoc_do_parsepart($res);
 ipworkszip_officedoc_do_readrelationships($res);
 ipworkszip_officedoc_do_replacepart($res);
 ipworkszip_officedoc_do_reset($res);
 ipworkszip_officedoc_do_resolvecontenttype($res);

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.
ContentTypeIsOverrideSpecifies if this is a default content type or an override.
ContentTypeMediaTypeThe media type for this entry, as defined by RFC2616.
ContentTypeTargetIf it's a default content type, this will be the file extension it applies to.
NamespaceCountThe number of records in the Namespace arrays.
NamespacePrefixThe Prefix for the Namespace .
NamespaceURINamespace URI associated with the corresponding Prefix .
PackagePathThe path to the Open XML package file.
PackagePropertyCountThe number of records in the PackageProperty arrays.
PackagePropertyDataTypeThe data type associated with this property, if the information is available.
PackagePropertyNameThe name of this property.
PackagePropertyNamespaceThe XML Namespace URI associated with this property.
PackagePropertyPropIdIf this is a custom property, this will be the pid assigned to it.
PackagePropertyPropSetIf this is a custom property, this will be the GUID of the property set it belongs to.
PackagePropertyValueThe 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.
RelationshipContentTypeThe content type for the part referenced by this relationship, resolved from [Content_Types].
RelationshipIdThe unique ID of this relationship within this .
RelationshipPartNameThe name of the part this relationship entry applies to.
RelationshipTypeURIThe 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.
AttrNameThe Name provides the local name (without prefix) of the attribute.
AttrNamespaceAttribute namespace.
AttrPrefixAttribute prefix (if any).
AttrValueAttribute value.
XChildCountThe number of records in the XChild arrays.
XChildNameThe Name property provides the local name (without prefix) of the element.
XChildNamespaceNamespace of the element.
XChildPrefixPrefix of the element (if any).
XChildXTextThe 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.

BeginFileFired before each file is processed.
CharactersFired for plain text segments of the input stream.
CommentFired when a comment section is encountered.
EndElementFired when an end-element tag is encountered.
EndFileFired after each file is processed.
EndPrefixMappingFired when leaving the scope of a namespace declaration.
ErrorInformation about errors during data delivery.
EvalEntityFired every time an entity needs to be evaluated.
IgnorableWhitespaceFired when a section of ignorable whitespace is encountered.
MetaFired when a meta section is encountered.
OverwriteFired whenever a file exists and may be overwritten.
PIFired when a processing instruction section is encountered.
ProgressFired as progress is made.
SpecialSectionFired when a special section is encountered.
StartElementFired when a begin-element tag is encountered in the document.
StartPrefixMappingFired 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 PHP Edition - Version 20.0 [Build 8300]