|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jeuclid.MathMLParserSupport
@ThreadSafe public final class MathMLParserSupport
Utility class for the support parsing MathML and OpenDocument Formula (ODF) files.
This class supports parsing of files that are either MathML or OpenDocument Formula (ODF) files. It also supports parsing MathML from a given text string.
Method Summary | |
---|---|
static DocumentBuilder |
createDocumentBuilder()
Creates a DocumentBuilder that can be used to parse MathML documents into a standard DOM model. |
static Document |
parseFile(File inFile)
Parse an input file and return the DOM tree. |
static Document |
parseInputStreamODF(InputStream inStream)
Parse an input stream in ODF format. |
static Document |
parseInputStreamXML(InputStream inStream)
Parse an input stream in MathML XML format. |
static Document |
parseString(String content)
Create a DOM Document from a given string containing MathML content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException
ParserConfigurationException
- if the builder could not be configured properly.public static Document parseInputStreamXML(InputStream inStream) throws SAXException, IOException
inStream
- the stream to parse.
SAXException
- if a parse error occurs.
IOException
- if a read I/O error occurs.public static Document parseInputStreamODF(InputStream inStream) throws SAXException, IOException
inStream
- the stream to parse.
SAXException
- if a parse error occurs.
IOException
- if a read I/O error occurs.public static Document parseFile(File inFile) throws SAXException, IOException
This function will auto-detect if the given input is in MathML or ODF format.
inFile
- the file to parse.
SAXException
- if a parse error occurs.
IOException
- if a read I/O error occurs.public static Document parseString(String content) throws SAXException, ParserConfigurationException, IOException
content
- A String containing MathML.
SAXException
- a parsing error occurred.
ParserConfigurationException
- a configuration error occurred.
IOException
- for any other IO exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |