Dataset XML Format

The Nexacro provides X-API as a server module. Using this Nexacro API, NRE interprets the created Dataset format and displays apps on the UI screen.

This chapter explains the Dataset format created by X-API. XML files abiding by this format can be acknowledged as applicable data on the Nexacro Runtime. It is possible to develop server programs without using X-API.

Dataset XML Layout

XML Declaration

Root


Cache

Parameters


Parameter (repeat)


Dataset (repeat)


ColumnInfo


ConstColumn (repeat)

Column (repeat)


Rows


Row (repeat)


Col (repeat)

OrgRow


Col (repeat)

XML Declaration

The XML declaration is defined as follows.

<?xml version="1.0" encoding="utf-8"?>

The XML declaration should be placed at the beginning of an xml document. There should be no letter, including blanks, before the declaration.

XML Example

<?xml version="1.0" encoding="utf-8"?>
<Root xmlns="http://www.nexacroplatform.com/platform/dataset" ver="4000" >
     <Parameters>
          <Parameter id="service">stock</Parameter>
          <Parameter id="method">search</Parameter>
     </Parameters>
     <Dataset id="output">
          <ColumnInfo>
               <ConstColumn id="market" size="10" type="STRING" value="kse"/>
               <ConstColumn id="openprice" size="10" type="INT"
               value="15000"/>
               <Column id="stockCode" size="5" type="STRING"/>
               <Column id="currentprice" size="10" type="INT"/>
          </ColumnInfo>
          <Rows>
               <Row>
                    <Col id="currentCode">10001</Col>
                    <Col id="currentprice">5700</Col>
               </Row>
               <Row>
                    <Col id="currentCode">10002</Col>
                    <Col id="currentprice">14500</Col>
               </Row>
          </Rows>
     </Dataset>
</Root>

Dataset Elements

The Dataset elements are described here.

Root

Outline

The top-level element that indicates a Dataset.

Child element

Parameters, Dataset

Repeat

One

Property
<Root xmlns="http://www.nexacroplatform.com/platform/dataset">
<Root xmlns:nexacro="http://www.nexacroplatform.com/platform/dataset">
<Root xmlns=".." version="1000">

Property name

Description

xmlns

Name space, if not using a basic name space then show as xmlns:nexacro

ver

Clarifies Dataset layout version.

Parameters

Outline

An element clarifying the parameters needed for communication. The "child parameter" has the actual value, and the "parameters" element is an assemblage of (child) parameters .

Child element

Parameter

Repeat

None or one

Parameters > Parameter

Outline

Clarifies the value of a parameter

Child element

None

Repeat

None or as many as the number of parameters

Property
<Parameter id="ErrorMsg" type="STRING">SUCC</ Parameter >

Property Name

Description

id

Parameter name

type

Parameter type

Note

The Nexacro uses the required parameters described below. You need to set parameters for the interconnection with Nexacro.

<Parameter id="ErrorCode">1</Parameter>
<Parameter id="ErrorMsg">SUCC</Parameter>
<Parameter id="cachetype">Session</Parameter>

ID

ID

Description

ErrorCode

Error Code

  • When calling the transaction function:

    • In the case it is less than 0, which is a user defined-error, it will be processed as "fail" without reflecting UpdateStatus into InputDataset

    • In the case it is greater than 0, which is a user defined-normal status, it will be processed as "sucess" as reflecting InputDataset into UpdateStatus

  • When the load function is called:

    • In the case it is less than 0, it is processed as fail defined by the user.

    • In the case it is greater than 0, it is is processed as success as normal defined by the user.

  • In case not designated : 0

ErrorMsg

Error Message

When ErrorCode is not specified or 0, it is success. Otherwise, fail

CacheType

Defines the cache method type:

  • Type is dynamic, static or none

  • In case not designated : Session

Type

The data type can be one of the following.

Dataset

Outline

Element that has the value of one Dataset. A Dataset has ColumnInfo which defines its structure and Rows which has the actual data as child elements.

Child element

ColumnInfo, Rows

Repeat

None or as many as the number of Dataset XML passes

Property
<Dataset id="History">

Property Name

Description

id

Dataset name

Dataset > ColumnInfo

Outline

It is used to express the Dataset schema. Child elements—ConstColumns and Columns—show the actual data. ColumnInfo is an assemblage of ConstColumns and Columns. ConstColumns show the schema of the columns with fixed values. Columns show the schema of the columns with non-fixed values.

Child element

ConstColumn, Column

Repeat

None or one

As for the child elements of ColumnInfo, ConstColumns must come before Columns.

If ConstColumns and Columns are arranged out of order, the app may not be able to process the data.

(X) When ConstColumns do not come first
<ColumnInfo>
	<Column id="stockCode" size="5" type="STRING"/>
	<Column id="currentprice" size="10" type="INT"/>
	<ConstColumn id="market" size="10" type="STRING" value="kse"/>
	<ConstColumn id="openprice" size="10" type="INT" value="15000"/>
</ColumnInfo>
...
(X) When ConstColumns and Columns are jumbled
<ColumnInfo>
	<ConstColumn id="market" size="10" type="STRING" value="kse"/>
	<Column id="currentprice" size="10" type="INT"/>
	<ConstColumn id="openprice" size="10" type="INT" value="15000"/>
	<Column id="stockCode" size="5" type="STRING"/>
</ColumnInfo>
...

Dataset > ColumnInfo > ConstColumn

Outline

Expresses the schema as Column that always has a fixed value.

Child element

None

Repeat

None or as many as the number of fixed value column

Property
<ConstColumn id="systemName"
     size="255"
     type="STRING"
     value="Production"/>

Property Name

Description

id

Column name

size

Maximum data size

type

Data type of column

value

Fixed value of column

Note

Following are the data type that can come in type.

Dataset > ColumnInfo > Column

Outline

It clarifies the value of a parameter

Child element

None

Repeat

None or as many as the number of non-fixed value columns

Property
<Column id="department"
     size="255"
     type="STRING"
     prop="text"
     sumtext="total"/>

Property Name

Description

id

Column name

size

Maximum data size

type

Data type of the column

Prop

Defines the summary type

Sumtext

Character string when prop value is text

Note

The value set in the type will be the same as the type in ColumnInfo.

The prop has the following values.

Dataset > Rows

Outline

It is an assemblage of the rows of a Dataset. It has a row that shows the actual data as its child element.

Child element

Row

Repeat

None or one

Dataset > Rows > Row

Outline

It expresses the data of a row in the Dataset. It has Col as its child element, which expresses value of each column. When the type is "update", it has another child element Org_Row that has the original values of a row.

Child element

Col, Org_Row

Repeat

None or as many as the number of rows of Dataset

Property
<Row type="insert">
     <Col id="currentCode">10001</Col>
     <Col id="currentprice">13400</Col>
</Row>

<Rows>
     <Row type="update">
          <Col id="currentCode">10001</Col>
          <Col id="currentprice">13400</Col>
          <OrgRow>
               <Col id="currentCode">10001</Col>
               <Col id="currentprice">13700</Col>
          </OrgRow>
     </Row>
</Rows>

<Row type="delete">
     <Col id="currentCode">10001</Col>
     <Col id="currentprice">13400</Col>
</Row>

Property Name

Description

type

insert : A row added to the original Dataset

update: A row modified in the original Dataset. It includes Org_Row as its child element. Org_Row is the original row.

delete: A row deleted from the original Dataset

Dataset > Rows > Row > Col

Outline

It expresses the value of each column of a Dataset

Child element

None.

Repeat

None or as many as the number of columns

Property
<Col id="department">management</Col>

Property Name

Description

Id

Column name. It Is the same as the name set in the child elements (ConstColumn, Column) of ColumnInfo

Note

In the case of an empty string:

<Col id="department"></Col> 
or
<Col id="department"/>

In the case of null, it is classified as without "tag".

Dataset > Rows > Row > OrgRow

Outline

It has the original value when the value of Dataset’s row is modified. It has Col which has the actual value as its child element.

Child element

Col

Repeat

None or one.

Note

Similar to Row which is its parent element but has no property

Dataset > Rows > Row > OrgRow > Col

Outline

It expresses the original column value before the value is modified

Child element

None

Repeat

None or as many as the number of columns

Property
<Col id="department">management</Col>

Property Name

Description

id

Column name. It is the same as the name set in the child elements (ConstColumn, Column) of ColumnInfo