STx 3.9 Documentation

Book

Shell Items

Up

XML Element and Attribute Manipulation

Previous

EXTRACTTABLE

Next

SETATTRIBUTE

ROOT

SET xmlfile ROOT [*|tag] [aname avalue …] [/Delete]

Name, rename or delete the root element tag, add, modify or delete the root element's attributes. An attribute is deleted if the value (avalue) passed is empty (''). If a doctype has been defined, the root's tag and attributes are validated and the function fails if the parameters are invalid. All required attributes which are not passed, are automatically set to their default values.

tag

The root element tag (e.g. 'STxDataSet'). If an asterisk is specified, the root element tag is left unmodifed.

aname

An XML attribute name. Used in combination with the avalue parameter, this can set or delete a root element attribute.

avalue

A value to assign to the previous aname attribute. You can delete an attribute if this parameter is an empty string (e.g. $#file root * CH '')

/Delete

If specified, the root element and all of the contained content is removed. If used in combination with tag, this option deletes the document and then creates a new root element.

Using the ROOT command invalidates all saved positions!

© 2009 The Austrian Academy of Sciences Acoustics Research Institute