TANDBERG Gatekeeper/Border Controller API User Guide
D14172.01 page 4 of 84
1.1 Introduction to XML
XML is a markup language for documents containing structured information.
All information elements in an XML document are marked by a tag and a corresponding end-tag. The
end-tag has the same name as the tag, but is prefixed with a slash ( / ). All tags are put within
angular brackets ( < > ).
Example 1.1
Below is an example of how the configuration for SNMP could be represented using XML.
<Configuration>
<SNMP item="1">
<Mode item="1">On</Mode>
<CommunityName item="1">public</CommunityName>
<SystemContact item="1">Administrator</SystemContact>
<SystemLocation item="1"></SystemLocation>
</SNMP>
</Configuration>
From the tree structure of this example we can see that Mode, CommunityName, SystemContact
and SystemLocation are properties of the SNMP configuration. We can distinguish between
container-elements and value-elements. Container-elements contain one or more sub-elements, while
value-elements contain a value. This is analogous to files and folders on a computer. Container-
elements are folders that can contain sub-folders and files, while value-elements are files containing
data.
In the XML structure for the SNMP configuration we see that the container-element SNMP contains four
sub-elements. All these sub-elements are value-elements, each holding values for the properties:
Mode, CommunityName, SystemContact and SystemLocation.
Example 1.2
In this example we will look at element attributes. Attributes are used to add meta information to an
element. Attributes are placed within the start tag of an element and different attributes are separated
by space.
An XML structure representing the status of a connection to an NTP server is shown below:
<Status>
<NTP item="1" status="Inactive"/>
</Status>
We can see from the status attribute of the NTP element that the NTP connection is Inactive. This
is because it has yet to be configured. There is no further relevant information when the NTP status is
inactive therefore the sub-structure of the NTP element is empty.