Code example for Locator

Methods: getColumnNumber, getLineNumber

0
  private String getLocatorString()
  { 
    final Locator locator = getLocator();
    if (locator == null)
    { 
      return ""; 
    } 
    final StringBuffer message = new StringBuffer(100);
    message.append(" [Location: Line=");
    message.append(locator.getLineNumber());
    message.append(" Column=");
    message.append(locator.getColumnNumber());
    message.append("] ");
    return message.toString();
 
  } 
 
  /** 
   * Starts parsing. 
   * 
   * @param attrs the attributes.