OFXAggregate Class
Properties Methods Events Config Settings Errors
The OFXAggregate class supports parsing of XML aggregates that can be retrieved from other classes.
Syntax
inebank.OFXAggregate
Remarks
The OFXAggregate class supports simple XML aggregate traversal functionality. Simply set the Aggregate property to the value received from any aggregate property of any class 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 class 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 class 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 class 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 class 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. |
UseDaemonThreads | Whether threads created by the class are daemon threads. |
UseInternalSecurityAPI | Whether or not to use the system security libraries or an internal implementation. |
Aggregate Property (OFXAggregate Class)
The full text of the current aggregate.
Syntax
public String getAggregate(); public void setAggregate(String aggregate);
Default Value
""
Remarks
Aggregate contains the full text of the XML aggregate currently being represented by the class'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 Class)
This property includes a collection of namespaces in the current namespace stack.
Syntax
public XMLNamespaceList getNamespaces(); public void setNamespaces(XMLNamespaceList namespaces);
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 not available at design time.
Please refer to the XMLNamespace type for a complete list of fields.XChildren Property (OFXAggregate Class)
This property includes a collection of child elements of the currently selected XML element.
Syntax
public XMLElementList getXChildren(); public void setXChildren(XMLElementList XChildren);
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 size -1.
This property is not available at design time.
Please refer to the XMLElement type for a complete list of fields.XElement Property (OFXAggregate Class)
This property includes the name of the current element.
Syntax
public String getXElement(); public void setXElement(String XElement);
Default Value
""
Remarks
The current element is specified through the XPath property.
XNamespace Property (OFXAggregate Class)
This property includes the namespace of the current element.
Syntax
public String getXNamespace(); public void setXNamespace(String XNamespace);
Default Value
""
Remarks
The current element is specified through the XPath property.
XParent Property (OFXAggregate Class)
This property includes the parent of the current element.
Syntax
public String getXParent();
Default Value
""
Remarks
The current element is specified through the XPath property.
This property is read-only.
XPath Property (OFXAggregate Class)
This property 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 |
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 Class)
This property includes the prefix of the current element.
Syntax
public String getXPrefix(); public void setXPrefix(String XPrefix);
Default Value
""
Remarks
The current element is specified through the XPath property.
XText Property (OFXAggregate Class)
This property includes the text of the current element.
Syntax
public String getXText(); public void setXText(String XText);
Default Value
""
Remarks
The current element is specified through the XPath property.
Config Method (OFXAggregate Class)
Sets or retrieves a configuration setting.
Syntax
public String config(String 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.
HasXPath Method (OFXAggregate Class)
Checks whether a certain XPath exists inside the aggregate.
Syntax
public boolean hasXPath(String XPath);
Remarks
Used when there is no assurance that a certain XPath exists inside an aggregate.
Error Event (OFXAggregate Class)
Fired when information is available about errors during data delivery.
Syntax
public class DefaultOFXAggregateEventListener implements OFXAggregateEventListener { ... public void error(OFXAggregateErrorEvent e) {} ... } public class OFXAggregateErrorEvent { public int errorCode; public String description; }
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally the class 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 Value: ""
The Name field provides the local name (without a prefix) of the element.
Namespace
String (read-only)
Default Value: ""
This field contains the namespace of the element.
Prefix
String (read-only)
Default Value: ""
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 Value: ""
This field contains the inner text of the element.
Constructors
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 Value: ""
URI
String
Default Value: ""
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( URI, prefix);
Config Settings (OFXAggregate Class)
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.
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 class 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 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 true tells the class 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 (OFXAggregate Class)
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. |