VXML 2.1 and parsing of XML data

For the <data> tag in the VoiceXML 2.1 specification, if the name
attribute
is set, then platforms must support XML parsing into a DOM.  The spec
later
talks about exposing the data as specified in Appendix D.

Its not clear to me why we are using the old style format for parsing
the DOM 
tree.  ECMA-357 (XML E4X) provides an alternative access method to parse
the DOM tree.

Given we have this XML string:

<?xml version="1.0" encoding="UTF-8"?> <?access-control
allow="*.roadrunner.edu *.acme.edu"?> <quote> <ticker>F</ticker>
<name>Ford Motor Company</name> <change>1.00</change> <last>30.00</last>
</quote> 

As specified by Appendix D, the price can be accessed via:
var price =
quote.documentElement.getElementsByTagName("last").item(0).firstChild.da
ta;

Using ECMA-357, it can be accessed as follows:

var price = quote.last[0];

Furthermore, the ECMA-357 spec states that E4X implementations are not
required to support the W3C DOM 
or to provide the capability to construct XML objects from W3C DOM
objects.   It would seem we could support
the simpler approach and make the DOM approach optional.

Christopher F. Passaretti
Software Product Development Manager
Nortel
cpassar@nortel.com
Office 1.631.285.2529 (ESN 297)
Fax    1.631.737.8505

Received on Thursday, 1 June 2006 01:52:21 UTC