Interface IXmlParser
- All Known Implementing Classes:
XmlDOMParser
public interface IXmlParser
Interface for xml parsers.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Method Summary
Modifier and TypeMethodDescriptionString[]
get a list of parse errors, if any.long
Get the time in milliseconds it took for the parse method to run.parse
(InputStream source) Parses the given SAX2 input source.
-
Method Details
-
getErrors
String[] getErrors()get a list of parse errors, if any.- Returns:
- Array containing errors encountered during the parse action (may be empty).
-
getParseTime
long getParseTime()Get the time in milliseconds it took for the parse method to run.- Returns:
- Long containing the number of milliseconds that were needed for the parse action.
-
parse
Parses the given SAX2 input source. You must have set a ContentHandler to process the actual content, otherwise nothing serious is done. You may call this again for a new document after parsing has finished.- Parameters:
source
- a SAX2 input source from which the XML is read- Returns:
- XML node containing the root node of the parsed XML.
- Throws:
XmlParseException
- in case of XML errorsIOException
- when the source can't be read
-