OFXAggregate Component
Properties Methods Events Config Settings Errors
The OFXAggregate component supports parsing of XML aggregates that can be retrieved from other components.
Syntax
DPayments.InEBank.OFXAggregate
Remarks
The OFXAggregate component supports simple XML aggregate traversal functionality. Simply set the Aggregate property to the value received from any aggregate property of any component in the package (e.g. the TxAggregate property from BankStatement or CCStatement). You can then use XPath to walk the Document Object Model (DOM) tree.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Aggregate | The full text of the current aggregate. |
Namespaces | This property includes a collection of namespaces in the current namespace stack. |
XChildren | This property includes a collection of child elements of the currently selected XML element. |
XElement | This property includes the name of the current element. |
XNamespace | This property includes 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 | This property includes the prefix of the current element. |
XText | This property includes the 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.
Config | Sets or retrieves a configuration setting. |
HasXPath | Checks whether a certain XPath exists inside the aggregate. |
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.
Error | Fired when information is available about errors during data delivery. |
Config Settings
The following is a list of config settings for the component with short descriptions. Click on the links for further details.
CacheContent | If true, the original XML is saved in a buffer. |
Charset | Specifies the charset used when encoding data. |
CloseInputStreamAfterProcess | Determines whether or not the input stream is closed after processing. |
CloseOutputStreamAfterProcess | Determines whether or not the output stream is closed after processing. |
EOL | The characters to use for separating lines. |
ErrorOnEmptyAttr | If true, passing an invalid attribute to the Attr method will throw an exception. |
ExtraNameChars | Extra characters for the parser to consider as name characters. |
ExtraSpaceChars | Extra characters for the parser to consider as white space. |
FlushOnEOL | If set, the parser flushes its text buffer after every line of text. |
IgnoreBadAttributePrefixes | If true, bad (unknown) attribute prefixes are ignored. |
IgnoreBadElementPrefixes | If true, bad (unknown) element prefixes are ignored. |
IncludeElementPrefix | Whether to include the prefix in the element name. |
IncludeXMLDeclaration | Whether to include the XML declaration when writing XML. |
Indent | The characters to use for each indentation level. |
Interrupt | Whether to stop parsing the current XML document. |
Offset | Current offset of the document being parsed. |
PreserveWhitespace | If true, leading and trailing whitespace in element text is preserved. |
QuoteChar | Quote character to use for attribute values. |
StringProcessingOptions | Defines options to use when processing string values. |
BuildInfo | Information about the product's build. |
GUIAvailable | Whether or not a message loop is available for processing events. |
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. |
Aggregate Property (OFXAggregate Component)
The full text of the current aggregate.
Syntax
Default Value
""
Remarks
Aggregate contains the full text of the XML aggregate currently being represented by the component's DOM. You may set this to a value obtained from any aggregate property of any other control (such as SignOnInfoAggregate from FIProfile). Once set, you can use XPath to walk the DOM tree. XElement and XText will retrieve the current element's name and contents, and XChildren can be used to get the number of children.
Namespaces Property (OFXAggregate Component)
This property includes a collection of namespaces in the current namespace stack.
Syntax
public XMLNamespaceList Namespaces { get; }
Public Property Namespaces As XMLNamespaceList
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 count -1.
This property is not available at design time.
Please refer to the XMLNamespace type for a complete list of fields.XChildren Property (OFXAggregate Component)
This property includes a collection of child elements of the currently selected XML element.
Syntax
public XMLElementList XChildren { get; }
Public Property XChildren As XMLElementList
Remarks
This property contains a collection of child elements of the currently selected XML element. The elements are provided in the collection in the same order they are found in the XML document.
This collection is indexed from 0 to count -1.
This property is not available at design time.
Please refer to the XMLElement type for a complete list of fields.XElement Property (OFXAggregate Component)
This property includes the name of the current element.
Syntax
Default Value
""
Remarks
The current element is specified through the XPath property.
XNamespace Property (OFXAggregate Component)
This property includes the namespace of the current element.
Syntax
Default Value
""
Remarks
The current element is specified through the XPath property.
XParent Property (OFXAggregate Component)
This property includes the parent of the current element.
Syntax
Default Value
""
Remarks
The current element is specified through the XPath property.
This property is read-only.
XPath Property (OFXAggregate Component)
This property provides a way to point to a specific element in the document.
Syntax
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]" |
XPrefix Property (OFXAggregate Component)
This property includes the prefix of the current element.
Syntax
Default Value
""
Remarks
The current element is specified through the XPath property.
XText Property (OFXAggregate Component)
This property includes the text of the current element.
Syntax
Default Value
""
Remarks
The current element is specified through the XPath property.
Config Method (OFXAggregate Component)
Sets or retrieves a configuration setting.
Syntax
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.
HasXPath Method (OFXAggregate Component)
Checks whether a certain XPath exists inside the aggregate.
Syntax
Remarks
Used when there is no assurance that a certain XPath exists inside an aggregate.
Error Event (OFXAggregate Component)
Fired when information is available about errors during data delivery.
Syntax
public event OnErrorHandler OnError; public delegate void OnErrorHandler(object sender, OFXAggregateErrorEventArgs e); public class OFXAggregateErrorEventArgs : EventArgs { public int ErrorCode { get; } public string Description { get; } }
Public Event OnError As OnErrorHandler Public Delegate Sub OnErrorHandler(sender As Object, e As OFXAggregateErrorEventArgs) Public Class OFXAggregateErrorEventArgs Inherits EventArgs Public ReadOnly Property ErrorCode As Integer Public ReadOnly Property Description As String End Class
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally the component throws an exception.
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.
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 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)
Default: ""
The Name field provides the local name (without a prefix) of the element.
Namespace
string (read-only)
Default: ""
This field contains the namespace of the element.
Prefix
string (read-only)
Default: ""
This field 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: ""
This field contains the inner text of the element.
Constructors
public XMLElement();
Public XMLElement()
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 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
Prefix
string
Default: ""
URI
string
Default: ""
This field contains the namespace URI associated with the corresponding Prefix. This URL is usually pointing to the XML schema for the namespace.
Constructors
public XMLNamespace();
Public XMLNamespace()
public XMLNamespace(string URI, string prefix);
Public XMLNamespace(ByVal URI As String, ByVal Prefix As String)
Config Settings (OFXAggregate 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.
XML Config Settings
This option should be combined with Indent for full effect.
If you would like any other characters to be considered as name characters, you may set them as a string into this property.
If you would like any other characters to be considered as white space, you may set them as a string into this property.
If False (default) and Validate is set to False, the prefix is included in the Element parameter (e.g., ds:DigestMethod).
If True and Validate is set to False, the prefix is not included in the Element parameter (e.g., DigestMethod).
This setting is applicable only when Validate is False.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> ...
This option should be combined with EOL for full effect.
void xml_OnStartElement(object sender, XMLStartElementEventArgs e)
{
xml.Config("Interrupt");
}
Offset values start at 1.
Note: This applies only 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 as follows:
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:
&"<>
When set to 1, the following text would be fired through the Characters event:
&"<>
Base Config Settings
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.
- 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 components: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.
Setting this configuration setting to true tells the component to use the internal implementation instead of using the system security libraries.
On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.
If using the .NET Standard Library, this setting will be true on all platforms. The .NET Standard library does not support using the system security libraries.
Note: This setting is static. The value set is applicable to all components used in the application.
When this value is set, the product's system dynamic link library (DLL) is no longer required as a reference, as all unmanaged code is stored in that file.
Trappable Errors (OFXAggregate Component)
XML Errors
101 | Invalid attribute index. |
102 | No attributes available. |
103 | Invalid namespace index. |
104 | No namespaces available. |
105 | Invalid element index. |
106 | No elements available. |
107 | Attribute does not exist. |
201 | Unbalanced element tag. |
202 | Unknown element prefix (cannot find namespace). |
203 | Unknown attribute prefix (cannot find namespace). |
204 | Invalid XML markup. |
205 | Invalid end state for parser. |
206 | Document contains unbalanced elements. |
207 | Invalid XPath. |
208 | No such child. |
209 | Top element does not match start of path. |
210 | DOM tree unavailable (set BuildDOM to True and reparse). |
302 | Cannot open file. |
401 | Invalid XML would be generated. |
402 | An invalid XML name has been specified. |