public interface ParserCallback
Modifier and Type | Field and Description |
---|---|
static int |
ERROR_ATTIBUTE_VALUE_INVALID
Error code denoting that an invalid attribute value was found in the XML
|
static int |
ERROR_ATTRIBUTE_NOT_SUPPORTED
Error code denoting that an unsupported attribute was found in the XML
|
static int |
ERROR_ENCODING
Error code denoting that the encoding the page needed according to its charset (usually specified in the content-type response header) is unsupported in the device
|
static int |
ERROR_MULTIPLE_ROOTS
Error code denoting that the document had more than one root element
|
static int |
ERROR_NO_CLOSE_TAG
Error code denoting that a tag was not closed properly in the XML
|
static int |
ERROR_NO_ROOTS
Error code denoting that the document had no root element at all (empty document or seriously malformed XML)
|
static int |
ERROR_TAG_NOT_SUPPORTED
Error code denoting that an unsupported tag was found in the XML
|
static int |
ERROR_UNEXPECTED_CHARACTER
Error code denoting that the parser bumped into an unexpected character
|
static int |
ERROR_UNEXPECTED_TAG_CLOSING
Error code denoting that a tag was not closed prematurely
|
static int |
ERROR_UNRECOGNIZED_CHAR_ENTITY
Error code denoting that an invalid character entity was found
A character entity is XML codes that start with an ampersand and end with semicolon and denote special/reserved chars
|
Modifier and Type | Method and Description |
---|---|
boolean |
parsingError(int errorId,
String tag,
String attribute,
String value,
String description)
Called when encountering an error while parsing the XML document.
|
static final int ERROR_TAG_NOT_SUPPORTED
static final int ERROR_ATTRIBUTE_NOT_SUPPORTED
static final int ERROR_ATTIBUTE_VALUE_INVALID
static final int ERROR_NO_CLOSE_TAG
static final int ERROR_UNRECOGNIZED_CHAR_ENTITY
static final int ERROR_UNEXPECTED_TAG_CLOSING
static final int ERROR_UNEXPECTED_CHARACTER
static final int ERROR_MULTIPLE_ROOTS
static final int ERROR_NO_ROOTS
static final int ERROR_ENCODING
boolean parsingError(int errorId, String tag, String attribute, String value, String description)
errorId
- The error ID, one of the ERROR_* constantstag
- The tag in which the error occured (Can be null for non-tag related errors)attribute
- The attribute in which the error occured (Can be null for non-attribute related errors)value
- The value in which the error occured (Can be null for non-value related errors)description
- A verbal description of the error