Package com.sun.speech.engine.synthesis
Class JSMLParser
java.lang.Object
com.sun.speech.engine.synthesis.JSMLParser
Parses a JSML 0.6 document and returns a DOM.
-
Constructor Summary
ConstructorsConstructorDescriptionJSMLParser(String jsmlText, boolean validate) Creates a new JSMLParser for the given JSML text.JSMLParser(URL jsmlSource, boolean validate) Creates a new JSMLParser for the givenURL. -
Method Summary
Modifier and TypeMethodDescriptionGets the document for this parser.protected Documentparse(InputSource source, boolean validate) Parses the source and optionally validates it.
-
Constructor Details
-
JSMLParser
Creates a new JSMLParser for the given JSML text. Parses the text immediately and return any errors. The resulting DOM Document can be retrieved viagetDocument. The optional validate will do validation of the JSML text. This is typically not used since JSML doesn't require validation.- Parameters:
jsmlText- the JSML textvalidate- iftrue, validate the JSML text- See Also:
-
JSMLParser
Creates a new JSMLParser for the givenURL. Parses the text immediately and returns any errors. The resulting DOM Document can be retrieved viagetDocument. The optional validate will do validation of the JSML text. This is typically not used since JSML doesn't require validation.- Parameters:
jsmlSource- the URL containing JSML textvalidate- iftrue, validate the JSML text- See Also:
-
-
Method Details
-
getDocument
Gets the document for this parser.- Returns:
- a DOM
-
parse
Parses the source and optionally validates it.- Parameters:
source- the JSML textvalidate- iftrue, validate the JSML text
-