TANDBERG Gatekeeper/Border Controller API User Guide
D14172.01
page 5 of 84
Example 1.3
If we now look at the
NTP
element once NTP has been correctly configured we see that it now
contains more sub-structure:
<Status>
<NTP item="1" status="Active">
<Address item="1">10.0.0.2</Address>
<Port item="1">123</Port>
<LastUpdate item="1">2008-01-01 12:00:00</LastUpdate>
<LastCorrection item="1">1</LastCorrection>
</NTP>
</Status>
In this example, the attributes are used to provide valuable information in addition to establishing a
dependency to the underlying sub-structure of the element.
Example 1.4
In the above examples, all elements have an attribute named
item
. This attribute specifies the
instance number of the element. If we examine the DNS configuration for a system which has two
DNS servers configured then the XML structure would look like this:
<Configuration>
<IP item="1">
<DNS item="1">
<Server item="1">
<Address item="1">10.0.0.3</Address>
</Server>
<Server item="2">
<Address item="1">10.0.0.4</Address>
</Server>
<Domain item="1">
<Name item="1">example.com</Name>
</Domain>
</DNS>
</IP>
</Configuration>