| CallXML 3.0 Development Guide | Home | Frameset Home |
|
<log> statements that you will only be able to see when using the Voxeo Application Debugger.
<?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0">
<!-- fetch our XML document, and assign it to a locally scoped CallXML variable -->
<fetch value="CD_Listing.xml" var="myFetch" type="xml"/>
<block label="Axes" value="$myFetch;">
<!-- use the 'child' command to select the value of any child elements of the first 'disc' element
-->
<assign var="child" expr="list(//disc[1]/child::*/text())"/>
<log>*** CHILD: $child; ***</log>
<wait value="1s"/>
<!-- use the 'descendant' command to select the child elements of the first 'disc' element -->
<assign var="descendant" expr="list(//disc[1]/descendant::*/text())"/>
<log>*** DESCENDANT: $descendant; ***</log>
<wait value="1s"/>
<!-- use the 'parent' command to list the parent elements of the 'RSrating' element -->
<assign var="parent" expr="list(//RSrating/parent::*/text())"/>
<log>*** PARENT: $parent; ***</log>
<wait value="1s"/>
<!-- use the 'ancestor' command to list the parents, grandparents, etc. of the 'RSrating' element-->
<assign var="ancestor" expr="list(//RSrating/ancestor::*/text())"/>
<log>*** ANCESTOR: $ancestor; ***</log>
<wait value="1s"/>
<!-- use the 'following-sibling' command to list the sibling elements -->
<!-- that occur after the first 'RSrating' element -->
<assign var="followSib" expr="list(//RSrating[1]/following-sibling::*/text())"/>
<log>*** FOLLOWING-SIBLING: $followSib; ***</log>
<wait value="1s"/>
<!-- use the 'preceding-sibling' command to list the siblings -->
<!-- that occur before the 'Spinrating' element-->
<assign var="precedingSib" expr="list(//Spinrating/preceding-sibling::*/text())"/>
<log>*** PRECEDING-SIBLING: $precedingSib; ***</log>
<wait value="1s"/>
<!-- use the 'following' command to list the elements that come after the 'disc' element -->
<assign var="follow" expr="list(//disc/following::*/text())"/>
<log>*** FOLLOWING: $follow; ***</log>
<wait value="1s"/>
<!-- use the 'precede' command to list the elements that occur before the third 'disc' element -->
<assign var="precede" expr="list(//disc[3]/following::*/text())"/>
<log>*** PRECEDING: $precede; ***</log>
<wait value="1s"/>
<!-- use the 'self' command to list the current node -->
<assign var="self" expr="list(//disc[4]/self::*/text())"/>
<log>*** SELF: $self; ***</log>
<wait value="1s"/>
<!-- use the 'ancestor-or-self' command to list all parent, grandparent, etc -->
<!-- elements, as well as the currently selected node -->
<assign var="ancSelf" expr="list(//RSrating/ancestor-or-self::*/text())"/>
<log>*** ANCESTOR-OR-SELF: $ancSelf; ***</log>
<wait value="1s"/>
</block>
</callxml>
<?xml version="1.0" encoding="UTF-8"?>
<mynodes>
<axes>
<disc artist="Neutral Milk Hotel">
In the Aeroplane over the Sea
<RSrating>9.6</RSrating>
<Spinrating>8.9</Spinrating>
</disc>
<disc artist="Justin Timberlake">
Justified
<RSrating>2.1</RSrating>
<!-- and that is pretty generous... -->
</disc>
<disc artist="Maria Rita">
Vero
<RSrating>8.3</RSrating>
<Spinrating>9.1</Spinrating>
</disc>
<disc artist="William Shatner">Has Been
<RSrating>4.8</RSrating>
</disc>
</axes>
</mynodes>
| ANNOTATIONS: EXISTING POSTS |
| login |
|