Hello,
I am using the DOMErrorHandler API to locate the erroneous nodes (see
code below). Unfortunately, getRelatedNode() always returns the element,
but not the attruibute node. So, if an attribute has an error, I cannot
locate it. What can I do to get that information?
class SchemaDOMErrorHandler implements DOMErrorHandler
{
private Pattern patternAttribute;
private Pattern patternType;
public SchemaDOMErrorHandler()
{
...
}
public boolean handleError(DOMError domError)
{
String message = (String)domError.getMessage();
DOMLocator loc = (DOMLocator) domError.getLocation();
Node node = loc.getRelatedNode();
...
}
}
Thanks,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]