XML syntax in the Host On-Demand macro language

A Host On-Demand macro is stored in an XML script using Host On-Demand macro language XML elements. This section describes some of the conventions of XML and gives examples from the Host On-Demand macro language:
  • XML code is made up of elements. The Host On-Demand macro language contains about 35 XML elements.
  • Element names in the macro language are not case-sensitive, except in the sense that you must write an element in the same combination of upper and lower case in both the begin tag and the end tag. All of the following are correct; the ellipses (...) are not part of the XML text but are meant to indicate that an element contains other elements:
    <screen>   ...      </screen>
    <Screen>   ...      </Screen>
    <scrEen>   ...      </scrEen>
    However, customarily the master element is spelled HAScript and the other elements are spelled with all lower case.
  • Each XML element has a begin tag and an end tag, as shown in the examples below from the Host On-Demand macro language:
    <HAScript> ... </HAScript>
    <import> ... </import>
    <vars> ... </vars>
    <screen> ... </screen>
  • Optionally you can combine the begin tag and end tag of an XML element into one tag. This option is useful when the XML element includes attributes but not other elements. For example,
    <oia ... />
    <numfields ...  />
  • An element can contain attributes of the form attribute_name="attribute_value". For example:
    <oia status="NOTINHIBITED" optional="false" invertmatch="false"/>
    <numfields number="80" optional="false" invertmatch="false"/>
    You can use a pair of empty double quote characters (that is, two double quote characters with nothing in between) to specify that the attribute is not set to a value.
    <HAScript name="ispf_ex1" description="" timeout="60000" ... author="" ...>
  • An element can include other entire elements between its begin tag and end tag, in much the same way that HTML does. In the following example, a <description> element contains two elements: an <oia> element and a <numfields> element.
       <oia status="NOTINHIBITED" optional="false" invertmatch="false">
       <numfields number="80" optional="false" invertmatch="false"/>