Interface IXmlParser
-
- All Known Implementing Classes:
XmlDOMParser
public interface IXmlParser
Interface for xml parsers.- Since:
- 5.0
- Author:
- O. Kerpershoek
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getErrors()
get a list of parse errors, if any.long
getParseTime()
Get the time in milliseconds it took for the parse method to run.IXmlNode
parse(InputStream source)
Parses the given SAX2 input source.
-
-
-
Method Detail
-
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
IXmlNode parse(InputStream source) throws XmlParseException, IOException
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
-
-