OfficeDoc Component

Properties   Methods   Events   Config Settings   Errors  

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

Syntax

IPWorksZip.Officedoc

Remarks

The component 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 component with short descriptions. Click on the links for further details.

ContentTypesCollection of content type entries.
NamespacesCollection of namespaces in the current namespace stack.
PackagePathThe path to the Open XML package file.
PackagePropertiesCollection of core/app/custom metadata properties associated with the archive.
PartDataThe contents of the currently selected part.
PartNameThe name of the currently selected part.
RelationshipsCollection of Relationships in the current relationships (*.rels) file.
ValidateWhen True, the parser checks that the document consists of well-formed XML.
XAttributesA collection of attributes of the current element.
XChildrenCollection of child elements of the current 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 component 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 component.
resolveContentTypeReturns the content type of the specified part.

Event List


The following is the full list of the events fired by the component 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.

Config Settings


The following is a list of config settings for the component 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.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
UseDaemonThreadsWhether threads created by the component are daemon threads.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

ContentTypes Property (OfficeDoc Component)

Collection of content type entries.

Syntax


public ContentTypeList getContentTypes();


Remarks

Contains the default content types, as well as overrides for parts in the archive.

This property is read-only.

Please refer to the ContentType type for a complete list of fields.

Namespaces Property (OfficeDoc Component)

Collection of namespaces in the current namespace stack.

Syntax


public XMLNamespaceList getNamespaces();


Remarks

This property contains a collection of XML namespaces, which are standards for providing uniquely named elements and attributes in an XML instance.

This collection is indexed from 0 to size -1.

This property is read-only and not available at design time.

Please refer to the XMLNamespace type for a complete list of fields.

PackagePath Property (OfficeDoc Component)

The path to the Open XML package file.

Syntax


public String getPackagePath();


public void setPackagePath(String packagePath);

Default Value

""

Remarks

This property specifies the path and filename of the Open XML package to work on.

PackageProperties Property (OfficeDoc Component)

Collection of core/app/custom metadata properties associated with the archive.

Syntax


public PackagePropertyList getPackageProperties();


Remarks

When the package is first opened using Open, the component looks for any metadata property files in the archive and will expose their contents through this collection.

This property is read-only.

Please refer to the PackageProperty type for a complete list of fields.

PartData Property (OfficeDoc Component)

The contents of the currently selected part.

Syntax


public byte[] getPartData();


public void setPartData(byte[] partData);

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 Component)

The name of the currently selected part.

Syntax


public String getPartName();


public void setPartName(String partName);

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 Component)

Collection of Relationships in the current relationships (*.rels) file.

Syntax


public RelationshipList getRelationships();


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.

Please refer to the Relationship type for a complete list of fields.

Validate Property (OfficeDoc Component)

When True, the parser checks that the document consists of well-formed XML.

Syntax


public boolean isValidate();


public void setValidate(boolean validate);

Default Value

True

Remarks

You can set Validate to False when you want to ignore XML format rules (e.g. while parsing HTML files).

XAttributes Property (OfficeDoc Component)

A collection of attributes of the current element.

Syntax


public XMLAttributeList getXAttributes();


Remarks

This collection consists of all attributes of the current XML element. The component parses each attribute into a collection of XMLAttribute types.

This collection is indexed from 0 to size -1.

This property is read-only and not available at design time.

Please refer to the XMLAttribute type for a complete list of fields.

XChildren Property (OfficeDoc Component)

Collection of child elements of the current element.

Syntax


public XMLElementList getXChildren();


Remarks

The elements are provided in the collection in the same order they are found in the document.

This collection is indexed from 0 to size -1.

This property is read-only and not available at design time.

Please refer to the XMLElement type for a complete list of fields.

XElement Property (OfficeDoc Component)

The name of the current element.

Syntax


public String getXElement();


Default Value

""

Remarks

The current element is specified via the XPath property.

This property is read-only.

XNamespace Property (OfficeDoc Component)

The namespace of the current element.

Syntax


public String getXNamespace();


Default Value

""

Remarks

The current element is specified via the XPath property.

This property is read-only.

XParent Property (OfficeDoc Component)

The parent of the current element.

Syntax


public String getXParent();


Default Value

""

Remarks

The current element is specified via the XPath property.

This property is read-only.

XPath Property (OfficeDoc Component)

Provides a way to point to a specific element in the document.

Syntax


public String getXPath();


public void setXPath(String XPath);

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
When XPath is set to a valid path, XElement points to the name of the element, with XParent, XNamespace, XPrefix, XChildren , and XText providing other properties of the element. The attributes of the current element are provided in the XAttributes collection.

BuildDOM must be set to True prior to parsing the document for the XPath functionality to be available.

Example (Setting XPath):

Document rootXML.XPath = "/"
Specific ElementXML.XPath = "/root/SubElement1/SubElement2/"
i-th ChildXML.XPath = "/root/SubElement1[i]"

XPrefix Property (OfficeDoc Component)

The prefix of the current element.

Syntax


public String getXPrefix();


Default Value

""

Remarks

The current element is specified via the XPath property.

This property is read-only.

XSubTree Property (OfficeDoc Component)

A snapshot of the current element in the document.

Syntax


public String getXSubTree();


Default Value

""

Remarks

The current element is specified via the XPath property. In order for this property to work you must have the CacheContent set to true.

This property is read-only.

XText Property (OfficeDoc Component)

The text of the current element.

Syntax


public String getXText();


Default Value

""

Remarks

The current element is specified via the XPath property.

This property is read-only.

Close Method (Officedoc Component)

Closes the Open XML package archive.

Syntax

public void close();

Remarks

When this method is called, the component will close the current archive and release all resources.

Config Method (Officedoc Component)

Sets or retrieves a configuration setting.

Syntax

public String config(String configurationString);

Remarks

Config is a generic method available in every component. It is used to set and retrieve configuration settings for the component.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, 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 Component)

Reads the contents of the currently selected part.

Syntax

public 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 Component)

Looks up a part in the current relationships file by it's type namespace URI.

Syntax

public String findPartByType(String typeURI);

Remarks

If a matching part can be found, it's part name is returned. Otherwise, an empty string is returned.

GetPropertyValue Method (Officedoc Component)

Returns the value of the specified package property.

Syntax

public String getPropertyValue(String propName, String 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 Component)

List all the parts contained in the document and their relationships.

Syntax

public void listParts();

Remarks

When this method is called, the component will read all the relationships in the document, recursively, and populate the Relationships collection.

Open Method (Officedoc Component)

Opens the Open XML package archive.

Syntax

public void open();

Remarks

When this method is called, the component 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 Component)

Parses the specified part as XML.

Syntax

public 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 Component)

Reads the relationships file in the archive associated with the specified part.

Syntax

public void readRelationships();

Remarks

When this method is called, the component 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 Component)

Replaces the contents of the specified part in the package.

Syntax

public 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 Component)

Resets the component.

Syntax

public void reset();

Remarks

Reset resets the state of the component. All properties will be set to their default values, and any files open will be closed.

ResolveContentType Method (Officedoc Component)

Returns the content type of the specified part.

Syntax

public String 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 Component)

Fired before each file is processed.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void beginFile(OfficedocBeginFileEvent e) {}
  ...
}

public class OfficedocBeginFileEvent {
  public int index;

  public boolean 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 CompressedName, DecompressedName, CompressedSize (decompression only), and DecompressedSize 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 DecompressedName and/or ExtractToPath. If DecompressedName 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. CompressedName and DecompressedName 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 Component)

Fired for plain text segments of the input stream.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void characters(OfficedocCharactersEvent e) {}
  ...
}

public class OfficedocCharactersEvent {
  public String text;

}

Remarks

The Characters event provides the plain text 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 Component)

Fired when a comment section is encountered.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void comment(OfficedocCommentEvent e) {}
  ...
}

public class OfficedocCommentEvent {
  public String 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 Component)

Fired when an end-element tag is encountered.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void endElement(OfficedocEndElementEvent e) {}
  ...
}

public class OfficedocEndElementEvent {
  public String namespace;

  public String element;

  public String QName;

  public boolean 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 with an empty element declaration.

EndFile Event (Officedoc Component)

Fired after each file is processed.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void endFile(OfficedocEndFileEvent e) {}
  ...
}

public class OfficedocEndFileEvent {
  public 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 CompressedName, DecompressedName, CompressedSize, and DecompressedSize fields in the Files collection for this index contain more detailed information about the file processed.

EndPrefixMapping Event (Officedoc Component)

Fired when leaving the scope of a namespace declaration.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void endPrefixMapping(OfficedocEndPrefixMappingEvent e) {}
  ...
}

public class OfficedocEndPrefixMappingEvent {
  public String prefix;

}

Remarks

The StartPrefixMapping event is fired when entering the scope of a namespace declaration.

Error Event (Officedoc Component)

Information about errors during data delivery.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void error(OfficedocErrorEvent e) {}
  ...
}

public class OfficedocErrorEvent {
  public int errorCode;

  public String description;

}

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the component throws an exception.

ErrorCode contains an error code and Description 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 Component)

Fired every time an entity needs to be evaluated.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void evalEntity(OfficedocEvalEntityEvent e) {}
  ...
}

public class OfficedocEvalEntityEvent {
  public String entity;

  public String 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 Component)

Fired when a section of ignorable whitespace is encountered.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void ignorableWhitespace(OfficedocIgnorableWhitespaceEvent e) {}
  ...
}

public class OfficedocIgnorableWhitespaceEvent {
  public String text;

}

Remarks

The ignorable whitespace section is provided by the Text parameter.

Meta Event (Officedoc Component)

Fired when a meta section is encountered.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void meta(OfficedocMetaEvent e) {}
  ...
}

public class OfficedocMetaEvent {
  public String 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 Component)

Fired whenever a file exists and may be overwritten.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void overwrite(OfficedocOverwriteEvent e) {}
  ...
}

public class OfficedocOverwriteEvent {
  public String filename;

  public boolean 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 component, 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 Component)

Fired when a processing instruction section is encountered.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void PI(OfficedocPIEvent e) {}
  ...
}

public class OfficedocPIEvent {
  public String 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 Component)

Fired as progress is made.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void progress(OfficedocProgressEvent e) {}
  ...
}

public class OfficedocProgressEvent {
  public byte[] data;

  public String filename;

  public long bytesProcessed;

  public 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 Component)

Fired when a special section is encountered.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void specialSection(OfficedocSpecialSectionEvent e) {}
  ...
}

public class OfficedocSpecialSectionEvent {
  public String sectionId;

  public String 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, while the SectionId parameter provides the section identifier (e.g. "CDATA").

StartElement Event (Officedoc Component)

Fired when a begin-element tag is encountered in the document.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void startElement(OfficedocStartElementEvent e) {}
  ...
}

public class OfficedocStartElementEvent {
  public String namespace;

  public String element;

  public String QName;

  public boolean 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 XAttributes collection.

The IsEmpty parameter is true when the event corresponds with an empty element declaration.

StartPrefixMapping Event (Officedoc Component)

Fired when entering the scope of a namespace declaration.

Syntax

public class DefaultOfficedocEventListener implements OfficedocEventListener {
  ...
  public void startPrefixMapping(OfficedocStartPrefixMappingEvent e) {}
  ...
}

public class OfficedocStartPrefixMappingEvent {
  public String prefix;

  public String 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
boolean (read-only)

Specifies if this is a default content type or an override.

MediaType
String (read-only)

The media type for this entry, as defined by RFC2616.

Target
String (read-only)

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 ContentType();



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)

The data type associated with this property, if the information is available.

Name
String (read-only)

The name of this property

Namespace
String (read-only)

The XML Namespace URI associated with this property. For custom properties, this will be an empty string.

PropId
String (read-only)

If this is a custom property, this will be the pid assigned to it.

PropSet
String (read-only)

If this is a custom property, this will be the GUID of the property set it belongs to.

Value
String (read-only)

The value of this property

Constructors

public PackageProperty();



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)

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)

The unique ID of this relationship within this .rels file

PartName
String (read-only)

The name of the part this relationship entry applies to.

TypeURI
String (read-only)

The XML namespace URI that specifies the meaning of this relationship.

Constructors

public Relationship();



XMLAttribute Type

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)

The Name provides the local name (without prefix) of the attribute.

Namespace
String (read-only)

Attribute namespace.

Prefix
String (read-only)

Attribute prefix (if any). If the attribute does not have a prefix, this property is empty.

Value
String (read-only)

Attribute value.

Constructors

public XMLAttribute();



XMLElement Type

An element contained within the XML document.

Remarks

This type describes an XML element. The fields for this type describe the element Name, Prefix, and Namespace 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)

The Name field provides the local name (without prefix) of the element.

Namespace
String (read-only)

Namespace of the element.

Prefix
String (read-only)

Prefix of the element (if any). If the element does not have a prefix, this property is empty.

XText
String (read-only)

The inner text of the element.

Constructors

public XMLElement();



XMLNamespace Type

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 Prefix and the URI of the namespace being defined.

The default namespace exists at index 0. The Prefix field at index 0 is "xmlns", and the Name field contains the default namespace.

Fields

URI
String

Namespace URI associated with the corresponding Prefix. This is usually a URL pointing to the XML schema for the namespace.

Constructors

public XMLNamespace();



public XMLNamespace( name,  prefix);



Config Settings (Officedoc Component)

The component 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 component, access to these internal properties is provided through the Config method.

OfficeDoc Config Settings

NormalizePartName:   Whether to normalize Part Names.

Sometimes the Part Names retrieved from a document will be of a format that is not directly usable in the PartName property when retrieving the part. For example: /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.

RelationshipIsExternal[x]:   Whether the relationship part is internal or external.

Some relationships in an Office document may be external items, such as URLs and files on disk. These relationships are not directly accessible via ExtractPart. This configuration option will return "True" if the relationship at index "x" of Relationships is an external part. Otherwise it will return "False"

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications, an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • 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.
MaskSensitive:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

This setting only works on these components: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

UseDaemonThreads:   Whether threads created by the component are daemon threads.

If set to True (default), when the component creates a thread, the thread's Daemon property will be explicitly set to True. When set to False, the component will not set the Daemon property on the created thread. The default value is True.

UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

When set to false, the component will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this setting to true tells the component to use the internal implementation instead of using the system security libraries.

This setting is set to false by default on all platforms.

Trappable Errors (Officedoc Component)

Errors

The following errors may be generated by the component. 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 component 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.