STx 3.9 Documentation

Book

Shell Items

Up

XML Element and Attribute Manipulation

Previous

ADDNODE

Next

DELETEELEMENT

ADDTABLE

SET xmlfile ADDTABLE table ename [/After|Before|Replace] [/In|Out /Data|Empty /Cdata] [/Tagerrorsonly]

Add the entries of table as elements to xmlfile. One element per entry is added, after (/A = default) or before (/B) the current element, or replacing (/R) the current element. The argument ename is used as the element tag.. If /Data is specified the entry data is stored in the element's data section using the table's write format, otherwise (/Empty = default), the entry data is stored as element attributes (use field names as attribute names, does not store empty fields, uses the write format) and the element data section is empty. In conjunction with /Data, the option /Cdata can be used to create CData-sections instead of normal data sections. There is a severe performance hit (1300%) if you use the /Before option since indexes have to be recalculated.

table

A shell table with the entries to be added to the XML file. This parameter is mandatory.

ename

The string to be used as the created element's tag. This parameter is mandatory.

/After|Before|Replace

Specify whether the new elements should be added before (/B) or after (/A) the selected element or replace the selected element (/R).

/In|Out

If specified, /In navigates into the selected element before the new element is added. If specified, /Out navigates out of the selected element after the new element has been added.

/Data|Empty

If /Data is specified, then the entry is stored in the data section of the new element. Otherwise, the data is stored as attribute values.

/Cdata

Specify /Cdata if the data should be enclosed within a CData section.

/Tagerrorsonly

Specify if entries which cause errors should be tagged in the table but correct entries should be added. Otherwise, if one error occurs, no entries are added.

© 2009 The Austrian Academy of Sciences Acoustics Research Institute