Code example for Locator

Methods: getColumnNumber, getLineNumber

0
    if (text == null)
    { 
      throw new SAXException(message);
    } 
    try 
    { 
      return Float.parseFloat(text);
    } 
    catch (NumberFormatException nfe)
    { 
      throw new SAXException("NumberFormatError: " + message);
    } 
  } 
 
  /** 
   * Parses the string <code>text</code> into an float. If text is null or 
   * does not contain a parsable value, the message given in 
   * <code>message</code> is used to throw a SAXException. 
   * 
   * @param text       the text to parse. 
   * @param defaultVal the defaultValue returned if parsing fails.