Please enable JavaScript to view this site.

 

We will use an example to explain this output formats: the result of a reading operation. It is specifically about reading the LK.ORDERS file with ItemID 2.

 

 

XML Format

Line breaks have been added for clarity.

 

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

<LINKAR>

<TOTAL_RECORDS>1</TOTAL_RECORDS>

<RECORDS>

  <RECORD>

    <LKITEMID>2</LKITEMID>

    <CUSTOMER>73</CUSTOMER>

    <DATE>17566</DATE>

    <ITEM>101105</ITEM>

    <QTY>286</QTY>

    <PRICE>271.18</PRICE>

    <DELIVERYDATE>17619ü17659</DELIVERYDATE>

    <QTYPARTIAL>143ü143</QTYPARTIAL>

  </RECORD>

</RECORDS>

</LINKAR>

 

The <LINKAR> node is the root. It only acts as a container of the operation result properties.

 

 

XML Properties

 

TOTAL_RECORDS Property: Number of records. In our example 1, because we have read only one record.

RECORDS Property: The list with all the records. Each particular record will have the tag RECORD. It will appear as many as RECORD tags as records found.

 

The second level nodes names always correspond with the properties names of the LkData class. For instance in an EXECUTE operation you will find <CAPTURING> … </CAPTURING> and <RETURNING> … </RETURNING> tags.

 

All RECORD tags represent a mv record. All of them have an special tag, LKITEMID, that represents the item-id of the record. They can also have another tag, ORIGINAL_RECORD, that has a copy of the record in mv format. You will have this tag if you have activated the option "Original Record" in the read. All other tags represent the record. If the attribute has a dict, the tag will be the DICT. If there are not dicts, Linkar with add the word LKFLD+the attribute number (f.i. LFFLD1 for first attribute).

 

Both, real attributes and calculated fields, are part of the RECORD tag. You can always know what kind of data are each one using the DICTIONARIES and LKPROPERTIES functions.

 

 

XML _DICT Format

This format uses dictionaries data in order to create a more complex structure. It uses the data defined in Assoc or Structure attributtes in the data bases that allows them. If it uses the structure (control-depend) definition like D3 it will name the groups with the <MvGroup> tag.

 

This only has effect inside the <RECORD> tag, so we only show this one.

 

<RECORD>

<LKITEMID>2</LKITEMID>

<CUSTOMER>73</CUSTOMER>

<DATE>17566</DATE>

<LST_LstItems>

  <LstItems>

    <ITEM>101105</ITEM>

    <QTY>286</QTY>

    <PRICE>271.18</PRICE>

    <DELIVERYDATE>17619ü17659</DELIVERYDATE>

    <QTYPARTIAL>143ü143</QTYPARTIAL>

  </LstItems>

</LST_LstItems>

</RECORD>

 

 

You can see that Linkar has expand the multivalue groups using the dictionary information. Each group has a tag, f.i. <LST_LstItems> and inside the tag another one for each multivalue attribute of the group, <LstItems>.

 

Linkar uses only dictionary information for this format, so it cannot process subvalues with this output format.

 

 

XML_SCH Format

This format uses the Linkar SCHEMAS properties, that allows it to generate even more complex structures using also subvalues.

 

This only has effect inside the <RECORD> tag, so we only show this one.

 

<RECORD>

<LKITEMID>2</LKITEMID>

<CUSTOMER>73</CUSTOMER>

<DATE>17566</DATE>

<LST_MvItems>

  <MvItems>

    <ITEM>101105</ITEM>

    <QTY>286</QTY>

    <PRICE>271.18</PRICE>

    <LST_SvDeliveryDates>

      <SvDeliveryDates>

        <DELIVERYDATE>17619</DELIVERYDATE>

        <QTYPARTIAL>143</QTYPARTIAL>

      </SvDeliveryDates>

      <SvDeliveryDates>

        <DELIVERYDATE>17659</DELIVERYDATE>

        <QTYPARTIAL>143</QTYPARTIAL>

      </SvDeliveryDates>

    </LST_SvDeliveryDates>

  </MvItems>

</LST_MvItems>

</RECORD>

 

 

As you can see, now the subvalues use the same kind of structure, one tag for a subvalue group, <LST_SvDeliverydates> , and another one for each subvalue in the group, <SvDeliveryDates>.

 

Linkar can do it using the information defined in Linkar Schemas. You must define SCHEMAS in order to use this tag.

 

If you wish you can experiment with the Linkar TRAINER program, executing Read functions, with different ReadOptions to see the different results. With this program, you can execute all the available clients functions with all their options