public class JSMLParser
extends java.lang.Object
| Constructor and Description |
|---|
JSMLParser(java.lang.String jsmlText,
boolean validate)
Creates a new JSMLParser for the given JSML
text.
|
JSMLParser(java.net.URL jsmlSource,
boolean validate)
Creates a new JSMLParser for the given
URL. |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Document |
getDocument()
Gets the document for this parser.
|
protected org.w3c.dom.Document |
parse(org.xml.sax.InputSource source,
boolean validate)
Parses the source and optionally validates it.
|
public JSMLParser(java.lang.String jsmlText,
boolean validate)
throws JSMLException
getDocument.
The optional validate will do validation of the JSML text.
This is typically not used since JSML doesn't require validation.jsmlText - the JSML textvalidate - if true, validate the JSML textJSMLException - if the JSML text contains errorsgetDocument()public JSMLParser(java.net.URL jsmlSource,
boolean validate)
throws JSMLException,
java.io.IOException
URL.
Parses the text immediately and returns any errors.
The resulting DOM Document can be retrieved via
getDocument.
The optional validate will do validation of the JSML text.
This is typically not used since JSML doesn't require validation.jsmlSource - the URL containing JSML textvalidate - if true, validate the JSML textJSMLException - if the JSML text contains errorsjava.io.IOException - if problems encountered with URLgetDocument()public org.w3c.dom.Document getDocument()
protected org.w3c.dom.Document parse(org.xml.sax.InputSource source,
boolean validate)
throws JSMLException,
java.io.IOException
source - the JSML textvalidate - if true, validate the JSML textJSMLException - if the JSML text contains errorsjava.io.IOException - if problems encountered with source