Um, yeah I'm fairly certain it gives a validation error message which
includes the element name, I'm sorry I don't have any examples to hand
but try something along the lines of:
class ParserErrors implements ErrorHandler
{
public void warning (SAXParseException e)
{
System.out.println("Warning!, Line: " + e.getLineNumber() +
"\nMessage: " + e.getMessage);
}
public void error (SAXParseException e)
{
etc....
}
public void fatalError (SAXParseException e)
{
etc...
}
}
and just try validating an invalid XML file and see what it gives you.
There are other methods available as well such as getColumnNumber(),
just take a look at the API. Use can use the results of these methods
in any way you want.
Steve