org.basex.build.file
Class TextParser
java.lang.Object
org.basex.core.Proc
org.basex.build.Parser
org.basex.build.SingleParser
org.basex.build.file.TextParser
public final class TextParser
- extends SingleParser
This class parses files in the plain-text format
and sends events to the specified database builder.
The parser provides one option, which can be specified via
SET PARSEROPT ...
:
encoding
specifies the input encoding
(default: UTF-8
).
lines
specified if the resulting XML splits the input
into lines. Can be set to yes
or no
(default: yes
).
Example:
SET PARSEROPT lines=no; CREATE DB ...
Description: Puts complete input into one text node.
- Author:
- BaseX Team 2005-12, BSD License, Christian Gruen
Method Summary |
void |
parse()
Parses the current input. |
Methods inherited from class org.basex.core.Proc |
abort, checkStop, databases, det, detail, listen, proc, prog, 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 |
TextParser
public TextParser(IO source,
Prop pr)
throws java.io.IOException
- Constructor.
- Parameters:
source
- document sourcepr
- database properties
- Throws:
java.io.IOException
- I/O exception
parse
public 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