W3C home > Mailing lists > Public > www-voice@w3.org > April to June 2006

VXML 2.1 and parsing of XML data

From: Christopher Passaretti <cpassar@nortel.com>
Date: Tue, 30 May 2006 18:17:57 -0400
Message-ID: <4ED8BBA17FC7DA41A34E1B0975DEC98C0C13DA92@zrtphxm2.corp.nortel.com>
To: <www-voice@w3.org>

For the <data> tag in the VoiceXML 2.1 specification, if the name
is set, then platforms must support XML parsing into a DOM.  The spec
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>

As specified by Appendix D, the price can be accessed via:
var price =

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
Office 1.631.285.2529 (ESN 297)
Fax    1.631.737.8505
Received on Thursday, 1 June 2006 01:52:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:39 UTC