public final class VoiceXmlDocument extends XmlDocument implements java.io.Serializable
VoiceXML is designed for creating audio dialogs that feature synthesized speech, digitized audio, recognition of spoken and DTMF key input, recording of spoken input, telephony and mixed initiative conversations. Its major goal is to bring the advantages of web-based development and content delivery to interactive voice response applications.
Objects of this class can create such VoiceXML documents or parse them.
The document type can be controlled via the
jvoicexml.vxml.version environment property. A value
of 2.0 sets the document type to VoiceXml20DocumentType
and a value of 2.1 sets the document type to
VoiceXml21DocumentType.
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
VoiceXmlDocument()
Create an empty VoiceXML document containing only the root Vxml element.
|
VoiceXmlDocument(org.w3c.dom.Document doc)
Construct a new VoiceXML document with the given document.
|
VoiceXmlDocument(org.xml.sax.InputSource source)
Constructs a new VoiceXML document from the given input source.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.w3c.dom.Node |
createRootNode()
Create the root node of the document.
|
protected java.lang.String |
getDefaultNamespaceURI()
Retrieves the default namespace.
|
org.w3c.dom.DocumentType |
getDoctype()
The Document Type Declaration (see
DocumentType)
associated with this document. |
Vxml |
getVxml()
Get the one and only child of this document: The Vxml node.
|
XmlNodeFactory<?> |
getXmlNodefactory()
Retrieves the node factory for child node lists.
|
protected org.w3c.dom.NodeList |
getXmlNodeList(org.w3c.dom.NodeList nodeList)
Get the XmlNodeList object corresponding to the nodelist.
|
static void |
setDocumentTypeFactory(DocumentTypeFactory factory)
Sets the document type factory.
|
adoptNode, appendChild, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getAttributes, getBaseURI, getChildNodes, getDocument, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getImplementation, getInputEncoding, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getStrictErrorChecking, getTextContent, getUserData, getXmlEncoding, getXmlNode, getXmlStandalone, getXmlVersion, hasAttributes, hasChildNodes, importNode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeChild, renameNode, replaceChild, setDocumentURI, setNodeValue, setPrefix, setStrictErrorChecking, setTextContent, setUserData, setXmlStandalone, setXmlVersion, toString, toXmlpublic VoiceXmlDocument()
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException - Error creating the document builder.public VoiceXmlDocument(org.xml.sax.InputSource source)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
source - Input source for a single XML document.javax.xml.parsers.ParserConfigurationException - Error creating the document builder.org.xml.sax.SAXException - Error parsing the input source.java.io.IOException - Error reading the input source.public VoiceXmlDocument(org.w3c.dom.Document doc)
doc - Encapsulated document.public static void setDocumentTypeFactory(DocumentTypeFactory factory)
factory - the factory to use.public org.w3c.dom.DocumentType getDoctype()
DocumentType)
associated with this document.getDoctype in interface org.w3c.dom.DocumentgetDoctype in class XmlDocumentDocumentTypepublic XmlNodeFactory<?> getXmlNodefactory()
getXmlNodefactory in class XmlDocumentprotected org.w3c.dom.Node createRootNode()
createRootNode in class XmlDocumentpublic Vxml getVxml()
null if there is none.protected org.w3c.dom.NodeList getXmlNodeList(org.w3c.dom.NodeList nodeList)
getXmlNodeList in class XmlDocumentnodeList - -
Node to convert to an XmlNodeListprotected java.lang.String getDefaultNamespaceURI()
getDefaultNamespaceURI in class XmlDocumentnull.