Top Method Summary
Options Name Purpose
AssignFieldValue (handle, rowid, character, character) Assigns a value from the XML document to a field of the given buffer, converting it into the field's data type
HANDLE BuildDocument (handle) Builds an X-DOCUMENT with the shape of the originally imported document from the data of the given dataset
CreateElementNode (handle, handle, character) Creates an element node, qualified with the document namespace when one is registered
FindOrCreateChildElement (handle, handle, character, handle) Positions the given X-NODEREF on the child element with the given name, creating the element when it does not exist yet
CHARACTER FormatFieldValue (handle) Formats the value of a buffer field for the XML document
ParseIsoDateTime (character, date, integer, integer) Parses an ISO 8601 datetime value into its components
ReadDocument (character, handle) Reads the given XML document file into the given dataset
ReadDocumentFromLongchar (longchar, handle) Reads the given XML document into the given dataset
ReadDocumentInternal (handle, handle) Reads the given X-DOCUMENT into the given dataset
ReadNode (handle, character, handle, handle, integer, character) Recursively reads an element instance of the XML document into the given dataset
RegisterDocumentRoot (character, character, logical) Registers the root element of the document
RegisterField (character, character, character, character, logical, logical) Registers the mapping of a temp-table field to a leaf element or attribute path of the document
RegisterTable (character, character, character, character, character) Registers the mapping of a temp-table to an element path of the document
WriteDocumentToFile (handle, character) Writes the data of the given dataset into an XML document file with the shape of the originally imported document
WriteDocumentToLongchar (handle, longchar) Writes the data of the given dataset into an XML document with the shape of the originally imported document
WriteRowContent (buffer, handle, handle, handle, handle) Writes the fields of the current record of the given buffer into the given row element and recurses into the child tables
WriteTableRows (buffer, handle, handle, handle, character, character, integer) Writes the records of a mapped table below the given parent element

Top Property Summary
Options Name Purpose
CHARACTER DocumentNamespaceUri
CHARACTER RootElementName
LOGICAL RootIsTable


Method Detail
Top

AssignFieldValue (handle, rowid, character, character)

Purpose: Assigns a value from the XML document to a field of the given
buffer, converting it into the field's data type
Notes: Repositions the buffer to the owning record first, as reading
nested structures may have moved it. Values that cannot be
converted leave the field unknown

Parameters:
phBuffer HANDLE
The handle of the buffer to assign the value to
proRow ROWID
The ROWID of the record to assign the value to
pcFieldName CHARACTER
The name of the field to assign the value to
pcValue CHARACTER
The value from the XML document
Top

HANDLE BuildDocument (handle)

Purpose: Builds an X-DOCUMENT with the shape of the originally imported
document from the data of the given dataset
Notes: The caller is responsible for deleting the returned handle

Parameters:
phDataset HANDLE
The handle of the source ProDataset
Returns HANDLE
The handle of the created X-DOCUMENT
Top

CreateElementNode (handle, handle, character)

Purpose: Creates an element node, qualified with the document namespace
when one is registered
Notes:

Parameters:
phDocument HANDLE
The handle of the X-DOCUMENT being built
phNode HANDLE
The handle of the X-NODEREF to create the node into
pcName CHARACTER
The local name of the element
Top

FindOrCreateChildElement (handle, handle, character, handle)

Purpose: Positions the given X-NODEREF on the child element with the
given name, creating the element when it does not exist yet
Notes:

Parameters:
phDocument HANDLE
The handle of the X-DOCUMENT being built
phParent HANDLE
The handle of the parent element
pcName CHARACTER
The local name of the child element
phChild HANDLE
The handle of the X-NODEREF to position
Top

CHARACTER FormatFieldValue (handle)

Purpose: Formats the value of a buffer field for the XML document
Notes: Decimals use the period as the decimal separator independent
of the session numeric format, dates and datetimes use the
ISO 8601 format and logical values are written as true/false

Parameters:
phField HANDLE
The handle of the buffer field
Returns CHARACTER
The formatted value
Top

ParseIsoDateTime (character, date, integer, integer)

Purpose: Parses an ISO 8601 datetime value into its components
Notes: The DATETIME-TZ function does not reliably parse ISO 8601
strings (the accepted string formats depend on the session
date format and the Z timezone suffix is not supported), so
the components are extracted by position. Supports the format
YYYY-MM-DDTHH:MM:SS[.fff][Z|+HH:MM|-HH:MM] MM:SS[.fff][Z|+HH:MM|-HH:MM]

Parameters:
pcValue CHARACTER
The trimmed ISO 8601 datetime value
pdaDate DATE
OUTPUT The date component
piMilliseconds INTEGER
OUTPUT The time component in milliseconds since midnight
piTimezoneMinutes INTEGER
OUTPUT The timezone offset in minutes (0 for Z or no timezone)
Top

ReadDocument (character, handle)

Purpose: Reads the given XML document file into the given dataset
Notes: Creates one record per mapped table element instance, assigns
the surrogate key fields and converts the values into the
field data types. Fields of absent optional elements keep the
unknown value

Parameters:
pcFileName CHARACTER
The name of the XML document file to read
phDataset HANDLE
The handle of the target ProDataset
Top

ReadDocumentFromLongchar (longchar, handle)

Purpose: Reads the given XML document into the given dataset
Notes: Creates one record per mapped table element instance, assigns
the surrogate key fields and converts the values into the
field data types. Fields of absent optional elements keep the
unknown value

Parameters:
plcXmlDocument LONGCHAR
The XML document to read
phDataset HANDLE
The handle of the target ProDataset
Top

ReadDocumentInternal (handle, handle)

Purpose: Reads the given X-DOCUMENT into the given dataset
Notes:

Parameters:
phDocument HANDLE
The handle of the X-DOCUMENT to read
phDataset HANDLE
The handle of the target ProDataset
Top

ReadNode (handle, character, handle, handle, integer, character)

Purpose: Recursively reads an element instance of the XML document into
the given dataset
Notes: Elements mapped to tables create a new record and become the
owner of the values of their non-table descendants

Parameters:
phNode HANDLE
The handle of the X-NODEREF of the element to read
pcParentPath CHARACTER
The path of the parent element
phDataset HANDLE
The handle of the target ProDataset
phOwnerBuffer HANDLE
The handle of the buffer owning the values of this element (unknown for the root)
piOwnerSequence INTEGER
The surrogate key value of the owning record
pcOwnerKeyFieldName CHARACTER
The name of the surrogate key field of the owning table (empty for the root)
Top

RegisterDocumentRoot (character, character, logical)

Purpose: Registers the root element of the document
Notes:

Parameters:
pcRootElementName CHARACTER
The local name of the root element
pcNamespaceUri CHARACTER
The namespace URI of the document
plRootIsTable LOGICAL
Logical value indicating if the root element is mapped to a temp-table
Top

RegisterField (character, character, character, character, logical, logical)

Purpose: Registers the mapping of a temp-table field to a leaf element
or attribute path of the document
Notes:

Parameters:
pcTempTableName CHARACTER
The name of the temp-table the field belongs to
pcFieldName CHARACTER
The name of the field
pcValuePath CHARACTER
The path of the value (attribute paths end in /@<name>)
pcXmlName CHARACTER
The local name of the leaf element or attribute
plIsAttribute LOGICAL
Logical value indicating if the value is an attribute
plIsTextNode LOGICAL
Logical value indicating if the value is the text content of the table element
Top

RegisterTable (character, character, character, character, character)

Purpose: Registers the mapping of a temp-table to an element path of
the document
Notes: Register parent tables before their child tables

Parameters:
pcTempTableName CHARACTER
The name of the temp-table (and its buffer in the dataset)
pcElementPath CHARACTER
The path of the element the table is derived from (e.g. /Document/BkToCstmrStmt/Stmt/Ntry)
pcKeyFieldName CHARACTER
The name of the surrogate key field of the table
pcParentTableName CHARACTER
The name of the parent temp-table (empty for top-level tables)
pcParentKeyFieldName CHARACTER
The name of the field referencing the surrogate key of the parent table (empty for top-level tables)
Top

WriteDocumentToFile (handle, character)

Purpose: Writes the data of the given dataset into an XML document file
with the shape of the originally imported document
Notes:

Parameters:
phDataset HANDLE
The handle of the source ProDataset
pcFileName CHARACTER
The name of the XML document file to write
Top

WriteDocumentToLongchar (handle, longchar)

Purpose: Writes the data of the given dataset into an XML document with
the shape of the originally imported document
Notes:

Parameters:
phDataset HANDLE
The handle of the source ProDataset
plcXmlDocument LONGCHAR
OUTPUT The XML document
Top

WriteRowContent (buffer, handle, handle, handle, handle)

Purpose: Writes the fields of the current record of the given buffer
into the given row element and recurses into the child tables
Notes: Fields with the unknown value are omitted

Parameters:
ttMappingTable buffer
The buffer of the ttMappingTable record describing the table
phDataset HANDLE
The handle of the source ProDataset
phBuffer HANDLE
The handle of the buffer positioned on the record to write
phDocument HANDLE
The handle of the X-DOCUMENT being built
phRowElement HANDLE
The handle of the element of the record
Top

WriteTableRows (buffer, handle, handle, handle, character, character, integer)

Purpose: Writes the records of a mapped table below the given parent
element
Notes: Creates the non-repeating container elements between the
parent element and the table element on demand and one table
element per record

Parameters:
ttMappingTable buffer
The buffer of the ttMappingTable record describing the table
phDataset HANDLE
The handle of the source ProDataset
phDocument HANDLE
The handle of the X-DOCUMENT being built
phParentElement HANDLE
The handle of the element of the parent record
pcParentElementPath CHARACTER
The element path of the parent record
pcFilterFieldName CHARACTER
The name of the field filtering the records (empty for top-level tables)
piFilterValue INTEGER
The surrogate key value of the parent record


Property Detail
Top

CHARACTER DocumentNamespaceUri


Returns CHARACTER
Top

CHARACTER RootElementName


Returns CHARACTER
Top

LOGICAL RootIsTable


Returns LOGICAL


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:06:36