Code example for Locator

Methods: getColumnNumber, getLineNumber

0
   * Reads an attribute as float and returns <code>def</code> if that fails. 
   * 
   * @param value   the attribute value. 
   * @param locator the locator provides the current parse position for meaningful error messages. 
   * @return the float value. 
   * @throws ParseException if an parse error occured. 
   */ 
  public static Float parseFloat(final String value, final Locator locator)
      throws ParseException 
  { 
    if (value == null)
    { 
      return null; 
    } 
    try 
    { 
      return new Float(value);
    } 
    catch (Exception ex)
    { 
      throw new ParseException("Failed to parse value", locator);