users@jaxb.java.net

How to get the element name on a validation error

From: Ryan McDonough <rmcdonough_at_mac.com>
Date: Mon, 20 Jan 2003 22:00:15 -0500

Hi,

I'm trying to create a custom ValidationEventHander that will provide more
detail about the validation error than the DefaultValidationHandler. I'd
like to have the handler return the name of the element that is throwing the
error and a more human readable message detailing the cause. I also need to
find the name of this element when using "on demand" validation. So far, I'm
not having much luck. I have been using the following to try and get it:

event.getLocator().getNode().getLocalName()

But getNode() returns null in both unmarshall and on-demand. Are there any
other ways to do what I'm trying to do? Thanks.

Ryan-

--
"Latest survey shows that 3 out of 4 people make up 75% of the world's
population"