org.basex.build.xml
Class XMLParser
java.lang.Object
org.basex.core.Proc
org.basex.build.Parser
org.basex.build.SingleParser
org.basex.build.xml.XMLParser
- Direct Known Subclasses:
- HTMLParser, JSONParser
public class XMLParser
- extends SingleParser
This class parses the tokens that are delivered by the XMLScanner
and
sends them to the specified database builder. This class offers a more
tolerant alternative to Java's internal SAX parser, which is used by the
SAXWrapper
class.
- Author:
- BaseX Team 2005-12, BSD License, Christian Gruen
Method Summary |
void |
close()
Closes the parser. |
protected java.lang.String |
det()
Returns short information on this process. |
void |
parse()
Parses the current input. |
double |
prog()
Returns a progress value (0 - 1). |
Methods inherited from class org.basex.core.Proc |
abort, checkStop, databases, detail, listen, proc, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLParser
public XMLParser(IO source,
Prop pr)
throws java.io.IOException
- Constructor.
- Parameters:
source
- document sourcepr
- database properties
- Throws:
java.io.IOException
- I/O exception
XMLParser
public XMLParser(IO source,
Prop pr,
boolean frag)
throws java.io.IOException
- Constructor.
- Parameters:
source
- document sourcepr
- database propertiesfrag
- allow parsing of document fragment
- Throws:
java.io.IOException
- I/O exception
parse
public final void parse()
throws java.io.IOException
- Description copied from class:
SingleParser
- Parses the current input.
- Specified by:
parse
in class SingleParser
- Throws:
java.io.IOException
- I/O exception
close
public void close()
throws java.io.IOException
- Description copied from class:
Parser
- Closes the parser.
- Overrides:
close
in class Parser
- Throws:
java.io.IOException
- I/O exception
det
protected final java.lang.String det()
- Description copied from class:
Proc
- Returns short information on this process.
- Overrides:
det
in class Proc
- Returns:
- header information
prog
public final double prog()
- Description copied from class:
Proc
- Returns a progress value (0 - 1).
Can be overwritten to give more detailed information.
- Overrides:
prog
in class Proc
- Returns:
- header information