XML DSC
The XML CDSC reads and writes case data in an XML file. Typically, you use this CDSC when you want to demonstrate or test the transfer of small volumes of case data. The internal name of this DSC is mrXmlDsc.
Warning: The XML DSC is supplied by UNICOM Intelligence for the purpose of demonstrating and testing the transfer of small volumes of data. Do not use the XML DSC in production processes; use the
UNICOM Intelligence Data File CDSC instead. The XML DSC might be withdrawn in a future release of UNICOM Intelligence.
The Visual C++ source code of this CDSC is provided with the UNICOM Intelligence Developer Documentation Library, as a reference for developers who are creating other CDSCs.
The XML CDSC implements the following features:
▪A single read/write command
▪Forward and backward cursors
▪Add and update
▪Hierarchical data
▪Table and column DDL
Support for hierarchical data
XML CDSC supports reading and writing hierarchical data in
HDATA hierarchical tables. However, the support for hierarchical data is limited and behaves differently from Quanvert DSC and RDB DSC 2. When you use these DSCs to read data, they always return both
VDATA and
HDATA tables. XML DSC, on the other hand, returns either a flat
VDATA table or
HDATA hierarchical tables, depending on the format of the data stored in the XML file. (Although it is possible to store data in both formats in the same XML file and XML DSC will then return both
VDATA and
HDATA tables.) Similarly, when writing to an XML file, XML CDSC writes the data in either
VDATA or
HDATA format, depending on the way the data is passed to it. See
Understanding hierarchical data and
Loops, grids, and levels.
The UNICOM Intelligence Developer Documentation Library comes with an mrScriptBasic sample (called
CdscHdataTransfer.mrs) that you can use to create
HDATA-enabled XML files. For more information, see
Creating HDATA-enabled XML files.
Schema
This example illustrates the format of the XML that the CDSC reads and writes to. Standard Microsoft schemas cannot be used because they do not support the categorical type.
<Tables>
<Table NAME="VDATA">
<Columns>
<Column NAME="address" TYPE="Text"/>
<Column NAME="age" TYPE="Categorical"/>
<Column NAME="gender" TYPE="Categorical"/>
<Column NAME="museums" TYPE="Categorical"/>
<Column NAME="visits" TYPE="Long"/>
</Columns>
<Data>
<Row>
<address VAL="124 Dill Hall Lane, Church Ditton"/>
<age VAL="{5}"/>
<gender VAL="{23}"/>
<museums VAL="{25}"/>
<visits VAL="1"/>
</Row>
<Row>
<address VAL="Gatehouse, Church Strarmthorpe"/>
<age VAL="{4}"/>
<gender VAL="{24}"/>
<museums VAL="{26,29}"/>
<visits/>
</Row>
</Data>
</Table>
</Tables>
See also