public class MultipageParser extends HandlerBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DTD_1
The DTD for multipage models.
|
static java.lang.String |
DTD_URL
The URL where the DTD is stored.
|
static java.lang.String |
MULTIPAGE_TAG
The string constant that specifies the start and end of a
document.
|
static java.lang.String |
PAGE_NUM_TAG
The string constant that specifies the page number of a page.
|
static java.lang.String |
PAGE_TAG
The string constant that specifies the start and end of a sheet
in a document.
|
static java.lang.String |
PAGE_TITLE_TAG
The string constant that specifies the title attribute of a
page.
|
static java.lang.String |
PUBLIC_ID
The public identity of the sketch dtd file.
|
static java.lang.String |
TITLE_TAG
The string constant that specifies the title attribute of a
document.
|
Constructor and Description |
---|
MultipageParser(ModelParser pageParser)
Create a MultipageParser with the specified model parser which
is used to parse the content of a page.
|
Modifier and Type | Method and Description |
---|---|
void |
attribute(java.lang.String name,
java.lang.String value,
boolean isSpecified)
Handle an attribute value assignment.
|
void |
charData(char[] chars,
int offset,
int length)
Handle character data.
|
void |
endElement(java.lang.String name)
Handle the end of an element.
|
void |
parse(java.io.Reader reader,
MultipageModel multi)
Parse the file (from reader) into the given multipage data structure.
|
java.lang.Object |
resolveEntity(java.lang.String publicID,
java.lang.String systemID)
Resolve an external entity.
|
void |
startElement(java.lang.String name)
Handle the start of an element.
|
doctypeDecl, endDocument, endExternalEntity, error, ignorableWhitespace, processingInstruction, startDocument, startExternalEntity
public static final java.lang.String PUBLIC_ID
public static final java.lang.String DTD_URL
public static final java.lang.String DTD_1
public static final java.lang.String TITLE_TAG
public static final java.lang.String MULTIPAGE_TAG
public static final java.lang.String PAGE_TAG
public static final java.lang.String PAGE_TITLE_TAG
public static final java.lang.String PAGE_NUM_TAG
public MultipageParser(ModelParser pageParser)
public void attribute(java.lang.String name, java.lang.String value, boolean isSpecified) throws java.lang.Exception
attribute
in interface XmlHandler
attribute
in class HandlerBase
name
- The name of the attribute.value
- The value of the attribute, or null if the attribute
is #IMPLIED
.isSpecified
- True if the value was specified, false if it
was defaulted from the DTD.java.lang.Exception
- The handler may throw any exception.XmlHandler.attribute(java.lang.String, java.lang.String, boolean)
public void charData(char[] chars, int offset, int length) throws java.lang.Exception
charData
in interface XmlHandler
charData
in class HandlerBase
chars
- The character data.offset
- The starting position in the array.length
- The number of characters available.java.lang.Exception
- The handler may throw any exception.XmlHandler.charData(char[], int, int)
public void endElement(java.lang.String name) throws java.lang.Exception
endElement
in interface XmlHandler
endElement
in class HandlerBase
name
- The element type name.java.lang.Exception
- The handler may throw any exception.XmlHandler.endElement(java.lang.String)
public void startElement(java.lang.String name) throws java.lang.Exception
startElement
in interface XmlHandler
startElement
in class HandlerBase
name
- The element type name.java.lang.Exception
- The handler may throw any exception.XmlHandler.startElement(java.lang.String)
public java.lang.Object resolveEntity(java.lang.String publicID, java.lang.String systemID)
resolveEntity
in interface XmlHandler
resolveEntity
in class HandlerBase
publicID
- The public identifier, or null if none was supplied.systemID
- The system identifier.XmlHandler.resolveEntity(java.lang.String, java.lang.String)
public void parse(java.io.Reader reader, MultipageModel multi) throws java.lang.Exception
java.lang.Exception