Creating HDATA-enabled XML files
XML CDSC supports reading and writing hierarchical data in HDATA hierarchical tables. However, the support for hierarchical data is limited. When you use XML DSC to read data, it returns either a flat VDATA table or HDATA hierarchical tables, or both VDATA and HDATA tables, depending on the format of the data stored in the XML file. 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.
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; instead use the
UNICOM Intelligence Data File CDSC. The XML DSC might be withdrawn in a future release of UNICOM Intelligence.
UNICOM Intelligence has a mrScriptBasic script (CdscHdataTransfer.mrs) that you can use to export hierarchical data to an XML file. You can use this script to transfer:
▪Data from any relational MR (RDB) database to an XML file in HDATA format. This requires access to an appropriate .mdd file.
▪Data from any Quanvert database (including a Quanvert levels database) to an XML file in HDATA format.
If you want to upgrade an existing XML file from VDATA format to HDATA format, you would need transfer it to an RDB database first and then run the script to transfer the data from the RDB database to XML in HDATA format.
These instructions assume that if you are exporting the data from a Quanvert database, you have already created an .
mdd file. For more information, see
2: Creating the .mdd file.
To transfer the data to an XML file in HDATA format
1 Open a Command Prompt. For example, on Windows 2000, from the Windows Start menu, choose: Programs > Accessories > Command Prompt
2 Change to the folder in which the .mrs file is located. This is typically:
[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\General\mrScriptBasic
3 Type mrscriptcl CdscHdataTransfer.mrs followed by any options you require.
4 On the Connection tab in the Data Link Properties dialog, enter the details of the metadata and case data you want to transfer. If you are transferring data from an RDB database, you must use an .mdd file and the UNICOM Intelligence Relational MR Database 2 CDSC. Click OK.
The Data Link Properties dialog opens again so that you can enter the target location.
5 On the Connection tab in the Data Link Properties dialog, select None in the Metadata section and select UNICOM Intelligence XML Data File (read-write) for the Case Data type and then enter the name and location of the target XML file. Click OK.
See also