@Override public void startElement(String namespace,String localName,String prefix,Attributes attributes,DeserializationContext context) throws SAXException {
  if (value == null) {
    try {
      value=javaType.newInstance();
    }
 catch (    Exception e) {
      Constructor[] constructors=javaType.getConstructors();
      if (constructors.length > 0) {
        constructorToUse=constructors[0];
      }
      if (constructorToUse == null) {
        throw new SAXException(Messages.getMessage("cantCreateBean00",javaType.getName(),e.toString()));
      }
    }
  }
  super.startElement(namespace,localName,prefix,attributes,context);
}

@ Override public void startElement ( String namespace , String localName , String prefix , Attributes attributes , DeserializationContext context ) throws SAXException { if ( value == null ) { try { value = javaType . newInstance ( ) ; } catch ( Exception e ) { Constructor [ ] constructors = javaType . getConstructors ( ) ; if ( constructors . length > 0 ) { constructorToUse = constructors [ 0 ] ; } if ( constructorToUse == null ) { throw new SAXException ( Messages . getMessage ( "cantCreateBean00" , javaType . getName ( ) , e . toString ( ) ) ) ; } } } super . startElement ( namespace , localName , prefix , attributes , context ) ; }
startelement the only reason that this method is overridden is so that the object value can be set or a reasonable exception is thrown indicating that the object cannot be created . this is done at this point so that it occurs before href / id processing .
