|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jeuclid.parser.Parser
@ThreadSafe public final class Parser
A JAXP compatible approach to MathML Parsing.
Constructor Summary | |
---|---|
protected |
Parser()
Default constructor. |
Method Summary | |
---|---|
DocumentBuilder |
getDocumentBuilder()
Retrieve a DocumentBuilder suitable for MathML parsing. |
static Parser |
getInstance()
Retrieve the singleton Parser instance. |
static Parser |
getParser()
Deprecated. use getInstance() instead. |
Node |
parse(Source source)
Extract the top Node from a given Source. |
Document |
parseStreamSource(StreamSource streamSource)
Parse a StreamSource and return its Document. |
Document |
parseStreamSourceAsOdf(StreamSource streamSource)
Parse a given StreamSource which represents an ODF document. |
Document |
parseStreamSourceAsXml(StreamSource streamSource)
Parse a given StreamSource which represents an XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Parser()
Method Detail |
---|
public static Parser getInstance()
@Deprecated public static Parser getParser() throws ParserConfigurationException
getInstance()
instead.
getInstance()
instead.
getInstance()
ParserConfigurationException
- see getInstance()
public Document parseStreamSource(StreamSource streamSource) throws SAXException, IOException
This method will auto-detect ODF or XML format and load an appropriate parser.
streamSource
- A StreamSource.
SAXException
- if a parse error occurred.
IOException
- if an I/O error occurred.public Document parseStreamSourceAsOdf(StreamSource streamSource) throws IOException, SAXException
streamSource
- StreamSource to parse.
SAXException
- if a parse error occurred.
IOException
- if an I/O error occurred.public Document parseStreamSourceAsXml(StreamSource streamSource) throws SAXException, IOException
streamSource
- StreamSource to parse.
SAXException
- if a parse error occurred.
IOException
- if an I/O error occurred.public DocumentBuilder getDocumentBuilder()
Please note:
public Node parse(Source source) throws SAXException, IOException
source
- the Source to use. Currently supported are DOMSource
,
StreamSource
SAXException
- if a parse error occurred.
IOException
- if an I/O error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |