User`s manual

11. Appendix A - Hydra Open Protocol
Barco – iStudio – R5976569 – user's manual – revision 09 – March-2007
____________________________________________________________________________________
11-2
11.1 Formatting
11.1.1 XML
All formatting in the HYDRA Open Protocol is based on XML, which stands for Extensible Markup Language. This
gives a uniform and readable look to all the data that is transferred to and received from the H
YDRA and is also
easily extensible.
A simple example of an XML structure is the following:
<XML>
<TAG>
</TAG>
</XML>
The whitespace is not necessary, neither are the newlines (\n). So the following structure is exactly the same:
<XML><TAG></TAG></XML>
And so is this structure:
<XML>
<TAG></TAG>
</XML>
XML and TAG are called tags. A tag starts with <tagname> and ends with </tagname>. Tagnames are com-
posed with numbers and capital letters. Inside a tag is its content, which can be for instance other tags or strings
or numbers. A tag can also have attributes, like in the following example:
<TAG ATTR1="value1" ATTR2="value2"></TAG>
ATTR1 and ATTR2 are the names of the attributes, and value1 and value2 are the values. Attribute names
are composed with numbers and capital letters. Values are placed between double quotes (").Values can be
anything. Because double quotes are already used as delimiters, you need another way to use double quotes in
values. The combination &quot; or &#34; stands for a double quote. 34 is the decimal value of the ASCII code for
the double quote.
Because & is used to specify any ASCII character, you must replace it with the combination &amp; or &#38; if
you want to use it inside the value. For instance the value "A&B" may look like this:
<TAG ATTR="&#34;A&#38;B&#34;"></TAG>
The contents of a tag can be anything, but certain characters with special meaning need to be replaced with the
following combinations either in numeric character reference or in character entity reference:
Character numeric character reference in
unicode notation
character entity reference
" (double quotes) &#34; &quot;
< (left angle bracket) &#60; &lt;
> (right angle bracket) &#62; &gt;
& (ampersand) &#38; &amp;
(new line) &#10;
The Hydra open protocol deviates from the XML standard in these ways:
Self-closing tags are not allowed
Unquoted values are allowed, but are returned capitalized
Tags are not case sensitive, but are returned capitalized
XML comments are not allowed