public Object bind( final Element e, final Class< ? > clazz )
{
final Node childNode = e.getFirstChild();
if ( ( childNode == null ) || ( !( childNode instanceof Text ) ) )
{
throw new BindingException( "Text node expected" );
}
else
{
final String value = ( ( Text ) childNode ).getData();
try
{
return this.create( value );
}
catch ( NumberFormatException nfe )
{
throw new BindingException( AbstractHandler.INCORRECT_VALUE_MESSAGE + value, nfe );
}
}
}