| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
Exceptionnet.n3.nanoxml.XMLExceptionnet.n3.nanoxml.XMLValidationExceptionpublic class XMLValidationExceptionextends XMLExceptionField Summary | |
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
Constructor Summary | |
| |
Method Summary | |
protected void |
|
String |
|
String |
|
String |
|
Methods inherited from class net.n3.nanoxml.XMLException | |
finalize, getException, getLineNr, getSystemID, printStackTrace, printStackTrace, printStackTrace, toString | |
public static final int ATTRIBUTE_WITH_INVALID_VALUE
An attribute has an invalid value.
- Field Value:
- 5
public static final int MISC_ERROR
Another error than those specified in this class was encountered.
- Field Value:
- 0
public static final int MISSING_ATTRIBUTE
An attribute was missing.
- Field Value:
- 3
public static final int MISSING_ELEMENT
An element was missing.
- Field Value:
- 1
public static final int MISSING_PCDATA
A PCDATA element was missing.
- Field Value:
- 6
public static final int UNEXPECTED_ATTRIBUTE
An unexpected attribute was encountered.
- Field Value:
- 4
public static final int UNEXPECTED_ELEMENT
An unexpected element was encountered.
- Field Value:
- 2
public static final int UNEXPECTED_PCDATA
An unexpected PCDATA element was encountered.
- Field Value:
- 7
public XMLValidationException(int errorType,
String systemID,
int lineNr,
String elementName,
String attributeName,
String attributeValue,
String msg)Creates a new exception.
- Parameters:
errorType- the type of validity errorsystemID- the system ID from where the data camelineNr- the line number in the XML data where the exception occurred.elementName- the name of the offending elementattributeName- the name of the offending attributeattributeValue- the value of the offending attributemsg- the message of the exception.
protected void finalize()
throws ThrowableCleans up the object when it's destroyed.
- Overrides:
- finalize in interface XMLException
public String getAttributeName()
Returns the name of the attribute in which the validation is violated. If there is no current attribute, null is returned.
public String getAttributeValue()
Returns the value of the attribute in which the validation is violated. If there is no current attribute, null is returned.
public String getElementName()
Returns the name of the element in which the validation is violated. If there is no current element, null is returned.