org.basex.build.xml
Class XMLParser
java.lang.Object
org.basex.core.Progress
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
| Fields inherited from class org.basex.build.Parser |
src |
|
Method Summary |
void |
close()
Closes the parser. |
void |
parse()
Parses the current input. |
double |
prog()
Returns a progress value (0 - 1). |
| Methods inherited from class java.lang.Object |
equals, 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
prog
public final double prog()
- Description copied from class:
Progress
- Returns a progress value (0 - 1).
Can be overwritten to give more detailed information.
- Returns:
- header information