public abstract class Parser extends Progress
| Modifier and Type | Field and Description |
|---|---|
protected Atts |
atts
Temporary attribute array.
|
protected Prop |
prop
Database properties.
|
IO |
src
Source document, or
null. |
protected java.lang.String |
target
Target path (empty, or suffixed with a single slash).
|
| Modifier | Constructor and Description |
|---|---|
protected |
Parser(IO source,
Prop pr)
Constructor.
|
protected |
Parser(java.lang.String source,
Prop pr)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the parser.
|
static Parser |
emptyParser(Prop pr)
Returns a parser instance for creating empty databases.
|
java.lang.String |
info()
Returns parser information.
|
static Item |
item(IO in,
Prop prop,
java.lang.String type)
Returns an XQuery item for the specified content type.
|
abstract void |
parse(Builder build)
Parses all nodes and sends events to the specified builder.
|
static SingleParser |
singleParser(IO in,
Prop prop,
java.lang.String target)
Returns a parser instance, based on the current options.
|
Parser |
target(java.lang.String path)
Sets the target path.
|
static SingleParser |
xmlParser(IO in,
Prop prop)
Returns an XML parser instance.
|
public IO src
null.protected final Atts atts
protected final Prop prop
protected java.lang.String target
protected Parser(java.lang.String source,
Prop pr)
source - document source, or nullpr - database propertiespublic abstract void parse(Builder build) throws java.io.IOException
build - database builderjava.io.IOException - I/O exceptionpublic void close()
throws java.io.IOException
java.io.IOException - I/O exceptionpublic java.lang.String info()
public Parser target(java.lang.String path)
path - target pathpublic static Parser emptyParser(Prop pr)
pr - database propertiespublic static SingleParser xmlParser(IO in, Prop prop) throws java.io.IOException
in - input sourceprop - database propertiesjava.io.IOException - I/O exceptionpublic static SingleParser singleParser(IO in, Prop prop, java.lang.String target) throws java.io.IOException
in - input sourceprop - database propertiestarget - relative path referencejava.io.IOException - I/O exceptionpublic static Item item(IO in, Prop prop, java.lang.String type) throws java.io.IOException
in - input sourceprop - database propertiestype - content type (media type)java.io.IOException - I/O exception