Cisco Cisco Unified Customer Voice Portal 10.5(1) 开发者指南
C
HAPTER
2:
C
ISCO
CVP
V
OICE
XML
API Introduction
C
ISCO
CVP V
OICE
XML 3.1
Programmer
Guide
the tag. An attribute is denoted by a blue circle in its box. The type of those attributes are shown
in the gray section of the box. An enumerated type is an attribute whose value can be one of a
select group of options (for example, “apple”, “orange” or “grape”). attribute2 is an optional
attribute, denoted by a question mark to its left. attribute1 is a required attribute, denoted by
having no symbol to its left.
in the gray section of the box. An enumerated type is an attribute whose value can be one of a
select group of options (for example, “apple”, “orange” or “grape”). attribute2 is an optional
attribute, denoted by a question mark to its left. attribute1 is a required attribute, denoted by
having no symbol to its left.
parent has four child tags that can appear within the encapsulating parent tag. This is denoted by
a red bracket encapsulating all the tags. A bracket indicates that the child tags must appear within
the parent tag in the order set in the diagram. A * next to the tag indicates it can appear from 0 to
many times. A + indicates it can appear from 1 to many times (it must appear at least once in the
document). A ? indicates it can appear from 0 to 1 time (if it appears, it can only once).
a red bracket encapsulating all the tags. A bracket indicates that the child tags must appear within
the parent tag in the order set in the diagram. A * next to the tag indicates it can appear from 0 to
many times. A + indicates it can appear from 1 to many times (it must appear at least once in the
document). A ? indicates it can appear from 0 to 1 time (if it appears, it can only once).
The child2 tag contains its own tags, another_child1 and another_child2. This time, however, an
angled red line is used to encapsulate the tags. This indicates that either one or the other can
appear, but not both. child4 has a similar situation, but a + sign appears, indicating that the child
tags can appear any number of times in any order, as long as there is at least one.
angled red line is used to encapsulate the tags. This indicates that either one or the other can
appear, but not both. child4 has a similar situation, but a + sign appears, indicating that the child
tags can appear any number of times in any order, as long as there is at least one.
The following is an example XML document that conforms to the above DTD:
<parent attribute1=”something”>
<child1 attribute=”a value”/>
<child1/>
<child2>
<child2>
<another_child1 attribute=”this is required”>
Some value for the another_child1 tag.
</another_child1>
<another_child2>
The
<another_child2>
The
content
for
another_child2.
</another_child2>
</child2>
<child4>
<child1_of_child4/>
<child2_of_child4/>
<child2_of_child4/>
<child1_of_child4/>
</child4>
</parent>
</child2>
<child4>
<child1_of_child4/>
<child2_of_child4/>
<child2_of_child4/>
<child1_of_child4/>
</child4>
</parent>
Notes:
•
child1 is allowed to appear multiple times because it has a * next to it. One child1 tag does
not have an attribute because it is optional. Additionally, since these tags do not encompass
any additional content, the tag is closed with a “/>” so there is no need for a closing tag.
not have an attribute because it is optional. Additionally, since these tags do not encompass
any additional content, the tag is closed with a “/>” so there is no need for a closing tag.
•
child2 contains its two child tags. The another_child1 and another_child2 tags encapsulate
text so they have an open and close tag. another_child1 must specify its required attribute.
text so they have an open and close tag. another_child1 must specify its required attribute.
•
child3 can be omitted because it is optional.
Copyright 2001 - 2005 Audium Corporation. All Rights Reserved. 10/05
17