Xml Configuration

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.

XML Configuration Settings

CacheContent:   If true, the original XML is saved in a buffer.

This config controls whether or not the component retains the entire original XML in a buffer. This is used to retain the original XML as opposed to returning generated XML after parsing. The default value is true.

Charset:   Specifies the charset used when encoding data.

This setting specifies the character set used when encoding data. This value will also be used when creating the XMLDeclaration. The default value is "utf-8".

CloseInputStreamAfterProcess:   Determines whether or not the input stream is closed after processing.

Determines whether or not the input stream set by SetInputStream is closed after processing is complete. The default value is True.

CloseOutputStreamAfterProcess:   Determines whether or not the output stream is closed after processing.

Determines whether or not the output stream set by SetOutputStream is closed after processing is complete. The default value is True.

EOL:   The characters to use for separating lines.

If specified, the component will format the output XML, using the specified characters to separate multiple lines for nested XML elements. The default value is CRLF ("\r\n") .

This option should be combined with Indent for full effect.

ErrorOnEmptyAttr:   If true, passing an invalid attribute to the Attr method will throw an exception.

If an invalid attribute name is passed into the GetAttr method, the method will return with an empty string if this is set to false, otherwise an exception is thrown.

ExtraNameChars:   Extra characters for the parser to consider as name characters.

Normally, the parser considers only the following characters as part of an XML identifier: 'A' through 'Z', 'a' through 'z', '0' through '9', 0x0300 through 0x036F, 0x203F through 0x2040, and '.', '-', '_', ':'.

If you would like any other characters to be considered as name characters, you may set them as a string into this property.

ExtraSpaceChars:   Extra characters for the parser to consider as white space.

Normally, the parser considers only the following characters as white space: ' ' (space), '\t' (tab), '\ n' (newline), '\r' (carriage return), '\f' (form feed), and '\v' (vertical tab).

If you would like any other characters to be considered as white space, you may set them as a string into this property.

FlushOnEOL:   If set, the parser flushes its text buffer after every line of text.

The FlushOnEOL property controls whether Characters events are fired for every line of the input text stream or not. Normally lines are buffered internally and delivered in batches, but if the FlushOnEOL flag is set, then a Characters event is fired for each line.

IgnoreBadAttributePrefixes:   If true, bad (unknown) attribute prefixes are ignored.

Normally a trappable error is generated when an unknown attribute prefix is encountered. This setting suppresses the error. The default value is True.

IgnoreBadElementPrefixes:   If true, bad (unknown) element prefixes are ignored.

Normally a trappable error is generated when an unknown element prefix is encountered. This setting suppresses the error. The default value is True.

IncludeElementPrefix:   Whether to include the prefix in the element name.

This setting specifies whether to include the element prefix in the Element parameter of the StartElement and EndElement events.

If False (default) and Validate is set to False the prefix is included in the Element parameter. For instance: ds:DigestMethod

If True and Validate is set to False the prefix is not included in the Element parameter. For instance: DigestMethod

This setting is only applicable when Validate is False.

IncludeXMLDeclaration:   Whether to include the XML declaration when writing XML.

This setting specifies whether the XML declaration is included in the output XML when writing XML. When set to True (default) the XML declaration will be included above any user specified XML. For instance:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
...
Indent:   The characters to use for each indentation level.

If specified, the component will format the output XML, using the specified characters to denote each indentation level for nested XML elements.

This option should be combined with EOL for full effect.

Offset:   Current offset of the document being parsed.

This property is useful for determining the location of possible XML errors in the document.

Offset values start at 1.

PreserveWhitespace:   If true, leading and trailing whitespace in element text is preserved.

Normally the leading and trailing whitespace from an element's text is trimmed. When this property is set to true, this leading and trailing whitespace is preserved. The default value is false.

QuoteChar:   Quote character to use for attribute values.

By default, the component will use double quotes around attribute values. This property can be used to specify a different character such as a single quote.

StringProcessingOptions:   Defines options to use when processing string values.

This setting determines what additional processing is performed on string values fired through the Characters event..

Note: This only applies when BuildDOM is False.

By default no additional processing is performed and the string is returned as is from the document. Strings may also be XML unescaped. Possible values are:

0 (none - default) No additional processing is performed.
1 Strings are XML unescaped.

For instance, when set to 0 the following text may be fired through the Characters event:

&amp;&quot;&lt;&gt;

When set to 1 the following text would be fired through the Characters event:

&"<>

Base Configuration 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).
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.

By default the component will use the system security libraries to perform cryptographic functions. Setting this to True tells the component to use the internal implementation instead of using the system's security API.

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