OfficeDoc Module
Properties Methods Events Config Settings Errors
The OfficeDoc module implements support for the Open XML Packaging Format used in Office 2007 documents.
Syntax
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 module with short descriptions. Click on the links for further details.
ContentTypes | Collection of content type entries. |
Namespaces | Collection of namespaces in the current namespace stack. |
PackagePath | The path to the Open XML package file. |
PackageProperties | Collection of core/app/custom metadata properties associated with the archive. |
PartData | The contents of the currently selected part. |
PartName | The name of the currently selected part. |
Relationships | Collection of Relationships in the current relationships (*.rels) file. |
Validate | This property controls whether documents are validated during parsing. |
XAttributes | A collection of attributes of the current element. |
XChildren | Collection of child elements of the current element. |
XElement | The name of the current element. |
XNamespace | The namespace of the current element. |
XParent | This property includes the parent of the current element. |
XPath | This property provides a way to point to a specific element in the document. |
XPrefix | The prefix of the current element. |
XSubTree | This property includes a snapshot of the current element in the document. |
XText | The text of the current element. |
Method List
The following is the full list of the methods of the module with short descriptions. Click on the links for further details.
Close | Closes the Open XML package archive. |
Config | Sets or retrieves a configuration setting. |
ExtractPart | Reads the contents of the currently selected part. |
FindPartByType | Looks up a part in the current relationships file by it's type namespace URI. |
GetPropertyValue | Returns the value of the specified package property. |
ListParts | List all the parts contained in the document and their relationships. |
Open | Opens the Open XML package archive. |
ParsePart | Parses the specified part as XML. |
ReadRelationships | Reads the relationships file in the archive associated with the specified part. |
ReplacePart | Replaces the contents of the specified part in the package. |
Reset | Resets the module. |
ResolveContentType | Returns the content type of the specified part. |
Event List
The following is the full list of the events fired by the module with short descriptions. Click on the links for further details.
BeginFile | Fired before each file is processed. |
Characters | This event is fired for plaintext segments of the input stream. |
Comment | This event is fired when a comment section is encountered. |
EndElement | This event is fired when an end-element tag is encountered. |
EndFile | Fired after each file is processed. |
EndPrefixMapping | This event is fired when leaving the scope of a namespace declaration. |
Error | Fired when information is available about errors during data delivery. |
EvalEntity | This event is fired every time an entity needs to be evaluated. |
IgnorableWhitespace | This event is fired when a section of ignorable whitespace is encountered. |
Meta | This event fires when a meta section is encountered. |
Overwrite | Fired whenever a file exists and may be overwritten. |
PI | This event is fired when a processing instruction section is encountered. |
Progress | Fired as progress is made. |
SpecialSection | This event is fired when a special section is encountered. |
StartElement | This event is fired when a begin-element tag is encountered in the document. |
StartPrefixMapping | This event is fired when entering the scope of a namespace declaration. |
Config Settings
The following is a list of config settings for the module 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. |
MaskSensitiveData | Whether sensitive data is masked in log messages. |
UseInternalSecurityAPI | Whether or not to use the system security libraries or an internal implementation. |
ContentTypes Property (OfficeDoc Module)
Collection of content type entries.
Syntax
public var contentTypes: Array<ContentType> { get {...} }
@property (nonatomic,readonly,assign,getter=contentTypeCount) int contentTypeCount; - (int)contentTypeCount; - (BOOL)contentTypeIsOverride:(int)contentTypeIndex; - (NSString*)contentTypeMediaType:(int)contentTypeIndex; - (NSString*)contentTypeTarget:(int)contentTypeIndex;
Default Value
""
Remarks
Contains the default content types, as well as overrides for parts in the archive.
This property is read-only.
Namespaces Property (OfficeDoc Module)
Collection of namespaces in the current namespace stack.
Syntax
public var namespaces: Array<XMLNamespace> { get {...} }
@property (nonatomic,readonly,assign,getter=namespaceCount) int namespaceCount; - (int)namespaceCount; - (NSString*)namespacePrefix:(int)namespaceIndex; - (NSString*)namespaceURI:(int)namespaceIndex;
Default Value
""
Remarks
This property contains a collection of XML namespaces, which are standards for providing uniquely named elements and attributes in an XML instance.
This property is read-only.
PackagePath Property (OfficeDoc Module)
The path to the Open XML package file.
Syntax
public var packagePath: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=packagePath,setter=setPackagePath:) NSString* packagePath; - (NSString*)packagePath; - (void)setPackagePath :(NSString*)newPackagePath;
Default Value
""
Remarks
This property specifies the path and filename of the Open XML package to work on.
PackageProperties Property (OfficeDoc Module)
Collection of core/app/custom metadata properties associated with the archive.
Syntax
public var packageProperties: Array<PackageProperty> { get {...} }
@property (nonatomic,readonly,assign,getter=packagePropertyCount) int packagePropertyCount; - (int)packagePropertyCount; - (NSString*)packagePropertyDataType:(int)packagePropertyIndex; - (NSString*)packagePropertyName:(int)packagePropertyIndex; - (NSString*)packagePropertyNamespace:(int)packagePropertyIndex; - (NSString*)packagePropertyPropId:(int)packagePropertyIndex; - (NSString*)packagePropertyPropSet:(int)packagePropertyIndex; - (NSString*)packagePropertyValue:(int)packagePropertyIndex;
Default Value
""
Remarks
When the package is first opened using Open, the class looks for any metadata property files in the archive and will expose their contents through this collection.
This property is read-only.
PartData Property (OfficeDoc Module)
The contents of the currently selected part.
Syntax
public var partData: String { get {...} set {...} }
public var partDataB: Data { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=partData,setter=setPartData:) NSString* partData; - (NSString*)partData; - (void)setPartData :(NSString*)newPartData; @property (nonatomic,readwrite,assign,getter=partDataB,setter=setPartDataB:) NSData* partDataB; - (NSData*)partDataB; - (void)setPartDataB :(NSData*)newPartData;
Default Value
""
Remarks
This property will hold the contents of the part selected by PartName after calling the ExtractPart method. It can also be set before calling ReplacePart.
PartName Property (OfficeDoc Module)
The name of the currently selected part.
Syntax
public var partName: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=partName,setter=setPartName:) NSString* partName; - (NSString*)partName; - (void)setPartName :(NSString*)newPartName;
Default Value
""
Remarks
This property specifies the name of the currently selected part in the document. If null or empty, no part is currently selected.
Relationships Property (OfficeDoc Module)
Collection of Relationships in the current relationships (*.rels) file.
Syntax
public var relationships: Array<Relationship> { get {...} }
@property (nonatomic,readonly,assign,getter=relationshipCount) int relationshipCount; - (int)relationshipCount; - (NSString*)relationshipContentType:(int)relationshipIndex; - (NSString*)relationshipId:(int)relationshipIndex; - (NSString*)relationshipPartName:(int)relationshipIndex; - (NSString*)relationshipTypeURI:(int)relationshipIndex;
Default Value
""
Remarks
When the package is first opened using Open, the top-level relationships file (/rels/.rels) is parsed and this collection populated with its contents. The ReadRelationships method can be used to populate this collection with the contents of other, part-specific relationship files, as needed.
This property is read-only.
Validate Property (OfficeDoc Module)
This property controls whether documents are validated during parsing.
Syntax
public var validate: Bool { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=validate,setter=setValidate:) BOOL validate; - (BOOL)validate; - (void)setValidate :(BOOL)newValidate;
Default Value
True
Remarks
When (default), the document will be validated during parsing. To disable validation set Validate to . Disabling validation may be useful in cases in which data can still be parsed even if the document is not well formed.
XAttributes Property (OfficeDoc Module)
A collection of attributes of the current element.
Syntax
public var xAttributes: Array<XMLAttribute> { get {...} }
@property (nonatomic,readonly,assign,getter=attrCount) int attrCount; - (int)attrCount; - (NSString*)attrName:(int)attrIndex; - (NSString*)attrNamespace:(int)attrIndex; - (NSString*)attrPrefix:(int)attrIndex; - (NSString*)attrValue:(int)attrIndex;
Default Value
""
Remarks
This collection consists of all attributes of the current XML element. The component parses each attribute into a collection of XMLAttribute types.
This property is read-only.
XChildren Property (OfficeDoc Module)
Collection of child elements of the current element.
Syntax
public var xChildren: Array<XMLElement> { get {...} }
@property (nonatomic,readonly,assign,getter=XChildCount) int XChildCount; - (int)XChildCount; - (NSString*)XChildName:(int)xChildIndex; - (NSString*)XChildNamespace:(int)xChildIndex; - (NSString*)XChildPrefix:(int)xChildIndex; - (NSString*)XChildXText:(int)xChildIndex;
Default Value
""
Remarks
The elements are provided in the collection in the same order they are found in the document.
This property is read-only.
XElement Property (OfficeDoc Module)
The name of the current element.
Syntax
public var xElement: String { get {...} }
@property (nonatomic,readonly,assign,getter=XElement) NSString* XElement; - (NSString*)XElement;
Default Value
""
Remarks
The current element is specified via the XPath property.
This property is read-only.
XNamespace Property (OfficeDoc Module)
The namespace of the current element.
Syntax
public var xNamespace: String { get {...} }
@property (nonatomic,readonly,assign,getter=XNamespace) NSString* XNamespace; - (NSString*)XNamespace;
Default Value
""
Remarks
The current element is specified via the XPath property.
This property is read-only.
XParent Property (OfficeDoc Module)
This property includes the parent of the current element.
Syntax
public var xParent: String { get {...} }
@property (nonatomic,readonly,assign,getter=XParent) NSString* XParent; - (NSString*)XParent;
Default Value
""
Remarks
The current element is specified through the XPath property.
This property is read-only.
XPath Property (OfficeDoc Module)
This property provides a way to point to a specific element in the document.
Syntax
public var xPath: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=XPath,setter=setXPath:) NSString* XPath; - (NSString*)XPath; - (void)setXPath :(NSString*)newXPath;
Default Value
""
Remarks
XPath implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML documents.
The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.
The following are possible values for an element accessor:
'name' | A particular element name |
name[i] | The i-th subelement of the current element with the given name |
[i] | The i-th subelement of the current element |
[last()] | The last subelement of the current element |
[last()-i] | The subelement located at the last location minus i in the current element |
name[@attrname="attrvalue"] | The subelement containing a particular value for a given attribute (supports single AND double quotes) |
.. | The parent of the current element |
BuildDOM must be set to True before parsing the document for the XPath functionality to be available.
Example. Setting XPath:
Document root | XML.XPath = "/" |
Specific Element | XML.XPath = "/root/SubElement1/SubElement2/" |
i-th Child | XML.XPath = "/root/SubElement1[i]" |
If an error occurs when setting this property an error will not be thrown. This property has a related method which will throw an error:
public func setXPath(xPath: String) throws
XPrefix Property (OfficeDoc Module)
The prefix of the current element.
Syntax
public var xPrefix: String { get {...} }
@property (nonatomic,readonly,assign,getter=XPrefix) NSString* XPrefix; - (NSString*)XPrefix;
Default Value
""
Remarks
The current element is specified via the XPath property.
This property is read-only.
XSubTree Property (OfficeDoc Module)
This property includes a snapshot of the current element in the document.
Syntax
public var xSubTree: String { get {...} }
@property (nonatomic,readonly,assign,getter=XSubTree) NSString* XSubTree; - (NSString*)XSubTree;
Default Value
""
Remarks
The current element is specified through the XPath property. For this property to work, you must set the CacheContent to True.
This property is read-only.
XText Property (OfficeDoc Module)
The text of the current element.
Syntax
public var xText: String { get {...} }
@property (nonatomic,readonly,assign,getter=XText) NSString* XText; - (NSString*)XText;
Default Value
""
Remarks
The current element is specified via the XPath property.
This property is read-only.
Close Method (OfficeDoc Module)
Closes the Open XML package archive.
Syntax
public func close() throws -> Void
- (void)close;
Remarks
When this method is called, the class will close the current archive and release all resources.
Config Method (OfficeDoc Module)
Sets or retrieves a configuration setting.
Syntax
- (NSString*)config:(NSString*)configurationString;
Remarks
Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.
To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).
To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.
ExtractPart Method (OfficeDoc Module)
Reads the contents of the currently selected part.
Syntax
public func extractPart() throws -> Void
- (void)extractPart;
Remarks
If the part specified by the PartName property exists, the corresponding physical file will be extracted from the archive and will be available through the PartData property.
If the part doesn't exists, or it's stored in interleaved format, an error will be raised.
FindPartByType Method (OfficeDoc Module)
Looks up a part in the current relationships file by it's type namespace URI.
Syntax
- (NSString*)findPartByType:(NSString*)typeURI;
Remarks
If a matching part can be found, it's part name is returned. Otherwise, an empty string is returned.
GetPropertyValue Method (OfficeDoc Module)
Returns the value of the specified package property.
Syntax
- (NSString*)getPropertyValue:(NSString*)propName :(NSString*)propNamespace;
Remarks
Looks up a package property named PropName in namespace PropNamespace in the core and app properties tables and returns it's value, if found.
If the property doesn't exists, an empty string is returned.
For custom properties. use an empty string ("") as the value of the PropNamespace parameter.
ListParts Method (OfficeDoc Module)
List all the parts contained in the document and their relationships.
Syntax
public func listParts() throws -> Void
- (void)listParts;
Remarks
When this method is called, the class will read all the relationships in the document, recursively, and populate the Relationships collection.
Open Method (OfficeDoc Module)
Opens the Open XML package archive.
Syntax
public func open() throws -> Void
- (void)open;
Remarks
When this method is called, the class will attempt to open the archive specified in PackagePath and extract package properties, content types and parse the master relationships file in the archive.
ParsePart Method (OfficeDoc Module)
Parses the specified part as XML.
Syntax
public func parsePart() throws -> Void
- (void)parsePart;
Remarks
If the part specified by PartName exists, the corresponding physical file will be extracted from the archive and parsed as XML. If BuildDOM is enabled, the DOM will be built internally and you can use XPath to query the resulting document, using the XPath property. If BuildDOM is disabled, only the XML parser-related events will be fired.
ReadRelationships Method (OfficeDoc Module)
Reads the relationships file in the archive associated with the specified part.
Syntax
public func readRelationships() throws -> Void
- (void)readRelationships;
Remarks
When this method is called, the class will look for a .rels file associated with the part specified by the PartName property. If found, the Relationships collection will now expose the contents of the relationships for that part.
ReplacePart Method (OfficeDoc Module)
Replaces the contents of the specified part in the package.
Syntax
public func replacePart() throws -> Void
- (void)replacePart;
Remarks
If the part specified by the PartName property exists, the corresponding physical file will be replaced with the contents of the PartData property. The package file will be modified in place right away.
If the part doesn't exists, it's stored in interleaved format, or PartData is null or empty, an error will be raised.
Reset Method (OfficeDoc Module)
Resets the component.
Syntax
public func reset() throws -> Void
- (void)reset;
Remarks
Reset resets the state of the class. All properties will be set to their default values, and any files open will be closed.
ResolveContentType Method (OfficeDoc Module)
Returns the content type of the specified part.
Syntax
public func resolveContentType() throws -> String
- (NSString*)resolveContentType;
Remarks
Applies the content type resolution rules specified in the Open XML packaging specification and returns the content type associated with PartName in the archive.
If there's no content type mapped for the part or for the extension, an empty string is returned.
BeginFile Event (OfficeDoc Module)
Fired before each file is processed.
Syntax
func onBeginFile(index: Int32, skip: inout Bool)
- (void)onBeginFile:(int)index :(int*)skip;
Remarks
BeginFile is fired before each file is processed by the compressor or decompressor, as appropriate. Index contains the array index of the file about to be processed, and the FilesCompressedName, FilesDecompressedName, FilesCompressedSize (decompression only), and FilesDecompressedSize fields of the Files collection for this index contain more detailed information about the file about to be processed.
When extracting, an alternate location may be specified by trapping the event, and modifying FilesDecompressedName and/or ExtractToPath. If FilesDecompressedName is set to an empty string, the file will not be written to disk. If WriteToProgressEvent is true, the file will still be decompressed, and the data may be extracted through the Progress event.
This event may also be trapped while compressing. FilesCompressedName and FilesDecompressedName may be changed.
You may set the Skip parameter to true in order to skip the file completely while compressing or extracting.
Characters Event (OfficeDoc Module)
This event is fired for plaintext segments of the input stream.
Syntax
func onCharacters(text: String)
- (void)onCharacters:(NSString*)text;
Remarks
The Characters event provides the plaintext content of the XML document (i.e., the text inside the tags). The text is provided through the Text parameter.
The text includes white space as well as end-of-line characters, except for ignorable whitespace, which is fired through the IgnorableWhitespace event.
Comment Event (OfficeDoc Module)
This event is fired when a comment section is encountered.
Syntax
func onComment(text: String)
- (void)onComment:(NSString*)text;
Remarks
The Comment event is fired whenever a comment section (<!-- ..text... -->) is found in the document.
The full text of the comment is provided by the Text parameter.
EndElement Event (OfficeDoc Module)
This event is fired when an end-element tag is encountered.
Syntax
- (void)onEndElement:(NSString*)namespace :(NSString*)element :(NSString*)QName :(BOOL)isEmpty;
Remarks
The EndElement event is fired when an end-element tag is found in the document.
The element name is provided by the Element parameter.
The IsEmpty parameter is true when the event corresponds to an empty element declaration.
EndFile Event (OfficeDoc Module)
Fired after each file is processed.
Syntax
func onEndFile(index: Int32)
- (void)onEndFile:(int)index;
Remarks
EndFile is fired after each file is processed by the compressor or decompressor, as appropriate. Index contains the array index of the file processed, and the FilesCompressedName, FilesDecompressedName, FilesCompressedSize, and FilesDecompressedSize fields in the Files collection for this index contain more detailed information about the file processed.
EndPrefixMapping Event (OfficeDoc Module)
This event is fired when leaving the scope of a namespace declaration.
Syntax
func onEndPrefixMapping(prefix: String)
- (void)onEndPrefixMapping:(NSString*)prefix;
Remarks
The StartPrefixMapping event is fired when entering the scope of a namespace declaration.
Error Event (OfficeDoc Module)
Fired when information is available about errors during data delivery.
Syntax
- (void)onError:(int)errorCode :(NSString*)description;
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally the class .
The ErrorCode parameter contains an error code, and the Description parameter contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.
EvalEntity Event (OfficeDoc Module)
This event is fired every time an entity needs to be evaluated.
Syntax
func onEvalEntity(entity: String, value: inout String)
- (void)onEvalEntity:(NSString*)entity :(NSString**)value;
Remarks
The Value parameter contains a suggested value for the entity (normally the entity name itself). You may set Value to a value of your choice, which will be later passed into the text stream.
IgnorableWhitespace Event (OfficeDoc Module)
This event is fired when a section of ignorable whitespace is encountered.
Syntax
func onIgnorableWhitespace(text: String)
- (void)onIgnorableWhitespace:(NSString*)text;
Remarks
The ignorable whitespace section is provided by the Text parameter.
Meta Event (OfficeDoc Module)
This event fires when a meta section is encountered.
Syntax
func onMeta(text: String)
- (void)onMeta:(NSString*)text;
Remarks
The Meta event is fired whenever a meta information section (<! ..text... >) is found in the document.
The full text of the meta section is provided by the Text parameter.
Overwrite Event (OfficeDoc Module)
Fired whenever a file exists and may be overwritten.
Syntax
func onOverwrite(filename: inout String, overwrite: inout Bool)
- (void)onOverwrite:(NSString**)filename :(int*)overwrite;
Remarks
Overwrite is fired when a file is about to be overwritten, and would overwrite an existing file. The event is fired during decompression.
Filename contains the full name of the file, specified with its pathname.
Overwrite specifies whether or not the file will be overwritten. For Zip, Jar, and Tar, this is equal by default to the value of the OverwriteFiles property. For Gzip, this value defaults to true.
Either of the parameters may be changed when the event is fired. Changing the value of Overwrite will override the default behavior of the class, and cause the file to be overwritten or not overwritten, depending on the value set. If Filename is changed, the value of Overwrite will be ignored, and the file will be written with the specified name. If a file of the new name also exists this file will be silently overwritten.
PI Event (OfficeDoc Module)
This event is fired when a processing instruction section is encountered.
Syntax
func onPI(text: String)
- (void)onPI:(NSString*)text;
Remarks
The PI event is fired whenever a processing instruction section (<? ..text... ?>) is found in the document.
The full text of the processing instruction is provided by the Text parameter.
Progress Event (OfficeDoc Module)
Fired as progress is made.
Syntax
- (void)onProgress:(NSData*)data :(NSString*)filename :(long long)bytesProcessed :(int)percentProcessed;
Remarks
The Progress event is automatically fired as compression or decompression is performed. When WriteToProgressEvent is true, the output data is provided through the Data parameter, allowing for it to be streamed out.
Filename contains the name of the file being written. If no file is being written, Filename will contain an empty string, and the output data will be provided exclusively through this event.
BytesProcessed contains the total number of uncompressed bytes processed. PercentProcessed contains the percent of uncompressed bytes processed, corresponding roughly to the running time of the operation.
For Gzip extraction only, BytesProcessed and PercentProcessed will reflect the number of compressed bytes extracted, as it is generally impossible to predetermine the total uncompressed size.
If WriteToProgressEvent is false, Data will contain null.
SpecialSection Event (OfficeDoc Module)
This event is fired when a special section is encountered.
Syntax
- (void)onSpecialSection:(NSString*)sectionId :(NSString*)text;
Remarks
The SpecialSection event is fired whenever a special section (such as <![ CDATA [ ..text... ]]>) is found in the document.
The full text of the special section is provided by the Text parameter, and the SectionId parameter provides the section identifier (e.g., CDATA).
StartElement Event (OfficeDoc Module)
This event is fired when a begin-element tag is encountered in the document.
Syntax
- (void)onStartElement:(NSString*)namespace :(NSString*)element :(NSString*)QName :(BOOL)isEmpty;
Remarks
The StartElement event is fired when a begin-element tag is found in the document.
The element name is provided through the Element parameter. The attribute names and values (if any) are provided through the XAttributesName, XAttributesNamespace, XAttributesPrefix, and XAttributesValue properties.
The IsEmpty parameter is True when the event corresponds to an empty element declaration.
StartPrefixMapping Event (OfficeDoc Module)
This event is fired when entering the scope of a namespace declaration.
Syntax
- (void)onStartPrefixMapping:(NSString*)prefix :(NSString*)URI;
Remarks
The EndPrefixMapping event is fired when leaving the scope of a namespace declaration.
ContentType Type
The Content Type entry as defined in the package.
Remarks
The content type represents an entry in the [Content_Types].xml file in the archive. It can either represent a default type associated with an extension, or an override specific to a given part in the archive.
Fields
isOverride
Bool (read-only)
Default Value: True
Specifies if this is a default content type or an override.
mediaType
String (read-only)
Default Value: ""
The media type for this entry, as defined by RFC2616.
target
String (read-only)
Default Value: ""
If it's a default content type, this will be the file extension it applies to. Otherwise, it will be the part name.
Constructors
public init()
PackageProperty Type
A core/app/custom metadata property attached to the package.
Remarks
A property is an entry in one of the package's property files.
All the properties, including core Open XML properties, application-specific properties and custom properties are represented here using the same structure.
Fields
dataType
String (read-only)
Default Value: ""
The data type associated with this property, if the information is available.
name
String (read-only)
Default Value: ""
The name of this property
namespace
String (read-only)
Default Value: ""
The XML Namespace URI associated with this property. For custom properties, this will be an empty string.
propId
String (read-only)
Default Value: ""
If this is a custom property, this will be the pid assigned to it.
propSet
String (read-only)
Default Value: ""
If this is a custom property, this will be the GUID of the property set it belongs to.
value
String (read-only)
Default Value: ""
The value of this property
Constructors
public init()
Relationship Type
A relationship entry in a .rels file in the archive.
Remarks
A relationship represents a reference to another part within the archive.
A relationship entry specifies a part name, the type of relationship (what it means) and a unique Id for this relation in the currently selected relationship file.
Fields
contentType
String (read-only)
Default Value: ""
The content type for the part referenced by this relationship, resolved from [Content_Types].xml according to the Open XML packaging specification rules.
id
String (read-only)
Default Value: ""
The unique ID of this relationship within this .rels file
partName
String (read-only)
Default Value: ""
The name of the part this relationship entry applies to.
typeURI
String (read-only)
Default Value: ""
The XML namespace URI that specifies the meaning of this relationship.
Constructors
public init()
XMLAttribute Type
This type describes an XML attribute from the current XML element.
Remarks
This type describes an XML attribute from the current element. It includes fields to denote information about the attribute being defined.
Fields
name
String (read-only)
Default Value: ""
The provides the local name (without prefix) of the attribute.
namespace
String (read-only)
Default Value: ""
This property contains the attribute namespace.
prefix
String (read-only)
Default Value: ""
This property contains the attribute prefix (if any). If the attribute does not have a prefix, this property is empty.
value
String (read-only)
Default Value: ""
This property contains the attribute value.
Constructors
public init()
XMLElement Type
This type describes an element contained within the XML document.
Remarks
This type describes an XML element. The fields for this type describe the element , , and of the given element.
The elements are inserted into the array in the same order they are found in the document.
Fields
name
String (read-only)
Default Value: ""
The property provides the local name (without a prefix) of the element.
namespace
String (read-only)
Default Value: ""
This property contains the namespace of the element.
prefix
String (read-only)
Default Value: ""
This property contains the prefix of the element (if any). If the element does not have a prefix, this property is empty.
xText
String (read-only)
Default Value: ""
This property contains the inner text of the element.
Constructors
public init()
XMLNamespace Type
This type describes an XML namespace from the current namespace stack.
Remarks
This type describes an XML namespace from the current stack. It includes fields to denote the and the of the namespace being defined.
The default namespace exists at index 0. The field at index 0 is xmlns, and the field contains the default namespace.
Fields
prefix
String
Default Value: ""
uri
String
Default Value: ""
This property contains the namespace URI associated with the corresponding . This URL is usually pointing to the XML schema for the namespace.
Constructors
public init()
public init(uRI: , prefix: )
Config Settings (OfficeDoc Module)
The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.OfficeDoc Config Settings
/ppt/slides/../media/image1.jpeg
When this option is set to True the component will automatically normalize
these Part Names so that they can be directly used in the PartName property
for retrieving the part. For example, the above would become:
/ppt/media/image1.jpeg
The default is True.
Base Config Settings
The following is a list of valid code page identifiers:
Identifier | Name |
037 | IBM EBCDIC - U.S./Canada |
437 | OEM - United States |
500 | IBM EBCDIC - International |
708 | Arabic - ASMO 708 |
709 | Arabic - ASMO 449+, BCON V4 |
710 | Arabic - Transparent Arabic |
720 | Arabic - Transparent ASMO |
737 | OEM - Greek (formerly 437G) |
775 | OEM - Baltic |
850 | OEM - Multilingual Latin I |
852 | OEM - Latin II |
855 | OEM - Cyrillic (primarily Russian) |
857 | OEM - Turkish |
858 | OEM - Multilingual Latin I + Euro symbol |
860 | OEM - Portuguese |
861 | OEM - Icelandic |
862 | OEM - Hebrew |
863 | OEM - Canadian-French |
864 | OEM - Arabic |
865 | OEM - Nordic |
866 | OEM - Russian |
869 | OEM - Modern Greek |
870 | IBM EBCDIC - Multilingual/ROECE (Latin-2) |
874 | ANSI/OEM - Thai (same as 28605, ISO 8859-15) |
875 | IBM EBCDIC - Modern Greek |
932 | ANSI/OEM - Japanese, Shift-JIS |
936 | ANSI/OEM - Simplified Chinese (PRC, Singapore) |
949 | ANSI/OEM - Korean (Unified Hangul Code) |
950 | ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC) |
1026 | IBM EBCDIC - Turkish (Latin-5) |
1047 | IBM EBCDIC - Latin 1/Open System |
1140 | IBM EBCDIC - U.S./Canada (037 + Euro symbol) |
1141 | IBM EBCDIC - Germany (20273 + Euro symbol) |
1142 | IBM EBCDIC - Denmark/Norway (20277 + Euro symbol) |
1143 | IBM EBCDIC - Finland/Sweden (20278 + Euro symbol) |
1144 | IBM EBCDIC - Italy (20280 + Euro symbol) |
1145 | IBM EBCDIC - Latin America/Spain (20284 + Euro symbol) |
1146 | IBM EBCDIC - United Kingdom (20285 + Euro symbol) |
1147 | IBM EBCDIC - France (20297 + Euro symbol) |
1148 | IBM EBCDIC - International (500 + Euro symbol) |
1149 | IBM EBCDIC - Icelandic (20871 + Euro symbol) |
1200 | Unicode UCS-2 Little-Endian (BMP of ISO 10646) |
1201 | Unicode UCS-2 Big-Endian |
1250 | ANSI - Central European |
1251 | ANSI - Cyrillic |
1252 | ANSI - Latin I |
1253 | ANSI - Greek |
1254 | ANSI - Turkish |
1255 | ANSI - Hebrew |
1256 | ANSI - Arabic |
1257 | ANSI - Baltic |
1258 | ANSI/OEM - Vietnamese |
1361 | Korean (Johab) |
10000 | MAC - Roman |
10001 | MAC - Japanese |
10002 | MAC - Traditional Chinese (Big5) |
10003 | MAC - Korean |
10004 | MAC - Arabic |
10005 | MAC - Hebrew |
10006 | MAC - Greek I |
10007 | MAC - Cyrillic |
10008 | MAC - Simplified Chinese (GB 2312) |
10010 | MAC - Romania |
10017 | MAC - Ukraine |
10021 | MAC - Thai |
10029 | MAC - Latin II |
10079 | MAC - Icelandic |
10081 | MAC - Turkish |
10082 | MAC - Croatia |
12000 | Unicode UCS-4 Little-Endian |
12001 | Unicode UCS-4 Big-Endian |
20000 | CNS - Taiwan |
20001 | TCA - Taiwan |
20002 | Eten - Taiwan |
20003 | IBM5550 - Taiwan |
20004 | TeleText - Taiwan |
20005 | Wang - Taiwan |
20105 | IA5 IRV International Alphabet No. 5 (7-bit) |
20106 | IA5 German (7-bit) |
20107 | IA5 Swedish (7-bit) |
20108 | IA5 Norwegian (7-bit) |
20127 | US-ASCII (7-bit) |
20261 | T.61 |
20269 | ISO 6937 Non-Spacing Accent |
20273 | IBM EBCDIC - Germany |
20277 | IBM EBCDIC - Denmark/Norway |
20278 | IBM EBCDIC - Finland/Sweden |
20280 | IBM EBCDIC - Italy |
20284 | IBM EBCDIC - Latin America/Spain |
20285 | IBM EBCDIC - United Kingdom |
20290 | IBM EBCDIC - Japanese Katakana Extended |
20297 | IBM EBCDIC - France |
20420 | IBM EBCDIC - Arabic |
20423 | IBM EBCDIC - Greek |
20424 | IBM EBCDIC - Hebrew |
20833 | IBM EBCDIC - Korean Extended |
20838 | IBM EBCDIC - Thai |
20866 | Russian - KOI8-R |
20871 | IBM EBCDIC - Icelandic |
20880 | IBM EBCDIC - Cyrillic (Russian) |
20905 | IBM EBCDIC - Turkish |
20924 | IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol) |
20932 | JIS X 0208-1990 & 0121-1990 |
20936 | Simplified Chinese (GB2312) |
21025 | IBM EBCDIC - Cyrillic (Serbian, Bulgarian) |
21027 | Extended Alpha Lowercase |
21866 | Ukrainian (KOI8-U) |
28591 | ISO 8859-1 Latin I |
28592 | ISO 8859-2 Central Europe |
28593 | ISO 8859-3 Latin 3 |
28594 | ISO 8859-4 Baltic |
28595 | ISO 8859-5 Cyrillic |
28596 | ISO 8859-6 Arabic |
28597 | ISO 8859-7 Greek |
28598 | ISO 8859-8 Hebrew |
28599 | ISO 8859-9 Latin 5 |
28605 | ISO 8859-15 Latin 9 |
29001 | Europa 3 |
38598 | ISO 8859-8 Hebrew |
50220 | ISO 2022 Japanese with no halfwidth Katakana |
50221 | ISO 2022 Japanese with halfwidth Katakana |
50222 | ISO 2022 Japanese JIS X 0201-1989 |
50225 | ISO 2022 Korean |
50227 | ISO 2022 Simplified Chinese |
50229 | ISO 2022 Traditional Chinese |
50930 | Japanese (Katakana) Extended |
50931 | US/Canada and Japanese |
50933 | Korean Extended and Korean |
50935 | Simplified Chinese Extended and Simplified Chinese |
50936 | Simplified Chinese |
50937 | US/Canada and Traditional Chinese |
50939 | Japanese (Latin) Extended and Japanese |
51932 | EUC - Japanese |
51936 | EUC - Simplified Chinese |
51949 | EUC - Korean |
51950 | EUC - Traditional Chinese |
52936 | HZ-GB2312 Simplified Chinese |
54936 | Windows XP: GB18030 Simplified Chinese (4 Byte) |
57002 | ISCII Devanagari |
57003 | ISCII Bengali |
57004 | ISCII Tamil |
57005 | ISCII Telugu |
57006 | ISCII Assamese |
57007 | ISCII Oriya |
57008 | ISCII Kannada |
57009 | ISCII Malayalam |
57010 | ISCII Gujarati |
57011 | ISCII Punjabi |
65000 | Unicode UTF-7 |
65001 | Unicode UTF-8 |
Identifier | Name |
1 | ASCII |
2 | NEXTSTEP |
3 | JapaneseEUC |
4 | UTF8 |
5 | ISOLatin1 |
6 | Symbol |
7 | NonLossyASCII |
8 | ShiftJIS |
9 | ISOLatin2 |
10 | Unicode |
11 | WindowsCP1251 |
12 | WindowsCP1252 |
13 | WindowsCP1253 |
14 | WindowsCP1254 |
15 | WindowsCP1250 |
21 | ISO2022JP |
30 | MacOSRoman |
10 | UTF16String |
0x90000100 | UTF16BigEndian |
0x94000100 | UTF16LittleEndian |
0x8c000100 | UTF32String |
0x98000100 | UTF32BigEndian |
0x9c000100 | UTF32LittleEndian |
65536 | Proprietary |
- Product: The product the license is for.
- Product Key: The key the license was generated from.
- License Source: Where the license was found (e.g., RuntimeLicense, License File).
- License Type: The type of license installed (e.g., Royalty Free, Single Server).
- Last Valid Build: The last valid build number for which the license will work.
This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.
Setting this configuration setting to tells the class to use the internal implementation instead of using the system security libraries.
This setting is set to by default on all platforms.
Trappable Errors (OfficeDoc Module)
ErrorsThe following errors may be generated by the class. Note that frequently the error message will contain more specific information than what is listed here.
Note that some non-fatal errors may be trapped and explicitly ignored in the Error event. This will allow the class to continue operation even in case of error.
OfficeDoc Errors
268 | The specified part name could not be found on the package, or the part is stored in interleaved format. |