Dataset XML Format

XPLATFORM provides X-API as server module. Using this API XPLATFORM Runtime interprets the Dataset format and shows on UI screen.

Here, the dataset format X-API produces will be explained. XML Format which follows this format, XPLATFORM Runtime will consider it as data and use it. So, server program can be developed 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

Xml proclamation which states something is xml is defined as the following.

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

Xml proclamation has to be in the very front of an xml document, and in front of this proclamation no letters, including blank letters can come.

xml example

<?xml version="1.0" encoding="UTF-8"?>
<Root xmlns="http://www.tobesoft.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 element description

Following is the description for dataset element.

Root

Property name

Description

Example

xmlns

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

<Root xmlns=”http://www.tobesoft.com/platform/Dataset”>

<Root xmlns:tobe=”http://www.tobesoft.com/platform/Dataset”>

ver

Clarifies dataset layout version.

<Root xmlns=”” ver=”5000”>

Parameters

Parameters > Parameter

Property name

Description

Example

id

Parameter name

<Parameter id="ErrorMsg"

type=”STRING”>SUCC

</ Parameter >

type

Parameter type

id

Description

Example

ErrorCode

Error Code.

-When calling transaction function, in the case it is lower than 0 then it is an error defined by the user. It will be processed as fail without reflecting UpdateStatus in InputDataset.

-When it is 0, it is the normal state defined by the user, UpdateStatus will be reflected on InputDataset and will be processed as success.

-When load function is called

When it is lower than 0 it is processed as fail defined by the user.

When higher than 0, it is a normal state defined by the user, and will be processed as success.

When undesignated : 0

<Parameter id="ErrorCode">1

</ Parameter >

ErrorMsg

Error Message


When undesignated : When ErrorCode is undesignated or 0 it is success, in other cases, fail.

< Parameter id="ErrorMsg">SUCC

</ Parameter >

CacheType

Designates the type of cache method. Type is divided into, dynamic, static and none.


When undesignated : Session

< Parameter id="cachetype">

Session

</ Parameter>

Dataset

Property name

Description

Example

id

Dataset name

<Dataset id=”History”>

Dataset > ColumnInfo

Dataset > ColumnInfo > ConstColumn

Property name

Description

Example

id

Column name

<ConstColumn id=”systemName”

size=”255”

type=”STRING”

value=”Production”/>

size

Maximum data size

type

Data type of column

value

Fixed value of column

Dataset > ColumnInfo > Column

Property name

Description

Example

id

Column name

<Column id=”department”

size=”255”

type=”STRING”

prop=”text”

sumtext=”total”/>

size

Maximum data size

type

Data type of column

Prop

Define type for summary

Sumtext

Character string when prop value is text

Dataset > Rows

Dataset > Rows > Row

Property name

Description

Example

type

insert : Row added to original dataset

<Row type="insert">

<Col id=”currentCode”>10001</Col>

<Col id=”currentprice”>13400</Col>

</Row>

update: Row modified in original dataset. It includes Org_Row as its child element. Org_Rowis the original row before changing.

<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>

delete: Row deleted from the original dataset

<Row type="delete">

<Col id=”currentCode”>10001</Col>

<Col id=”currentprice”>13400</Col>

</Row>

Dataset > Rows > Row > Col

Property name

Description

Example

Id

Column name. Is the same as the name set in Child element of ColumnInfo (ConstColumn , Column)

<Col id=”department”>management</Col>

Dataset > Rows > Row > OrgRow

Dataset > Rows > Row > OrgRow > Col

Property name

Description

Example

id

Column name. It is the same as the name set in child element of Column Info (Const Column , Column)

<Col id=”department”>management</Col>