public boolean element2Locator(Element e,SimpleLocator l){
  if (l == null)   return false;
  if (e instanceof ElementImpl) {
    ElementImpl ele=(ElementImpl)e;
    Document doc=ele.getOwnerDocument();
    String sid=(String)fDoc2SystemId.get(DOMUtil.getRoot(doc));
    int line=ele.getLineNumber();
    int column=ele.getColumnNumber();
    l.setValues(sid,sid,line,column,ele.getCharacterOffset());
    return true;
  }
  return false;
}

public boolean element2Locator ( Element e , SimpleLocator l ) { if ( l == null ) return false ; if ( e instanceof ElementImpl ) { ElementImpl ele = ( ElementImpl ) e ; Document doc = ele . getOwnerDocument ( ) ; String sid = ( String ) fDoc2SystemId . get ( DOMUtil . getRoot ( doc ) ) ; int line = ele . getLineNumber ( ) ; int column = ele . getColumnNumber ( ) ; l . setValues ( sid , sid , line , column , ele . getCharacterOffset ( ) ) ; return true ; } return false ; }
extract location information from an element node , store such information in the passed - in simplelocator object , then return true . returning false means can ' t extract or store such information .
