public abstract class SaxUnmarshaller extends Object implements DocumentHandler, ErrorHandler
| Modifier and Type | Field and Description |
|---|---|
protected Locator |
_locator
The document locator
|
| Constructor and Description |
|---|
SaxUnmarshaller() |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
abstract String |
elementName()
Returns the name of the element that this SaxUnmarshaller
handles
|
void |
endDocument() |
void |
endElement(String name) |
void |
error(SAXParseException exception) |
void |
error(String err)
This method is called for a general error.
|
void |
fatalError(SAXParseException exception) |
void |
finish()
Called to signal an end of unmarshalling.
|
Locator |
getDocumentLocator() |
abstract Object |
getObject()
Returns the Object created by this Unmarshaller
|
Resolver |
getResolver()
Returns the resolver used for resolving id references.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
void |
illegalAttribute(String attName)
This method is called when an illegal Attribute is encountered.
|
void |
illegalElement(String name)
This method is called when an illegal Element is encountered.
|
static boolean |
isWhiteSpace(char[] chars,
int start,
int length)
Determines if the given sequence of characters consists
of whitespace characters
|
void |
outOfOrder(String name)
This method is called when an out of order element is encountered
|
void |
processingInstruction(String target,
String data) |
void |
redefinedElement(String name)
This method is called when an element which may only
be defined once, is redefined.
|
void |
redefinedElement(String name,
String xtraInfo)
This method is called when an element which may only
be defined once, is redefined.
|
void |
setDocumentLocator(Locator locator) |
void |
setResolver(Resolver resolver)
Sets the Resolver to be used for resolving id references
|
void |
startDocument() |
void |
startElement(String name,
AttributeList atts) |
static int |
toInt(String str)
Converts the given String to an int
|
void |
warning(SAXParseException exception) |
protected Locator _locator
public abstract String elementName()
public abstract Object getObject()
public void finish()
throws SAXException
SAXExceptionpublic Locator getDocumentLocator()
public Resolver getResolver()
public void setResolver(Resolver resolver)
resolver - the Resolver to be used for resolving
id referencespublic static boolean isWhiteSpace(char[] chars,
int start,
int length)
chars - an array of characters to check for whitespacestart - the start index into the character arraylength - the number of characters to checkpublic void error(String err) throws SAXException
err - the error message to reportSAXException - always thrown.public void illegalAttribute(String attName) throws SAXException
attName - the name of the illegal attribute.SAXException - always thrown.public void illegalElement(String name) throws SAXException
name - the name of the illegal elementSAXException - always thrown.public void redefinedElement(String name) throws SAXException
name - the name of the elementSAXException - always thrown.public void redefinedElement(String name, String xtraInfo) throws SAXException
name - the name of the elementSAXException - always thrown.public void outOfOrder(String name) throws SAXException
SAXException - always thrown.public static int toInt(String str) throws IllegalArgumentException
str - the String to convert to an intIllegalArgumentException - when the given
String does not represent a valid intpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface DocumentHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface DocumentHandlerSAXExceptionpublic void endElement(String name) throws SAXException
endElement in interface DocumentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface DocumentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface DocumentHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface DocumentHandlerpublic void startDocument()
throws SAXException
startDocument in interface DocumentHandlerSAXExceptionpublic void startElement(String name, AttributeList atts) throws SAXException
startElement in interface DocumentHandlerSAXExceptionpublic void error(SAXParseException exception) throws SAXException
error in interface ErrorHandlerSAXExceptionpublic void fatalError(SAXParseException exception) throws SAXException
fatalError in interface ErrorHandlerSAXExceptionpublic void warning(SAXParseException exception) throws SAXException
warning in interface ErrorHandlerSAXExceptionCopyright © 2021. All rights reserved.