public static ResourcesPoet create(File file){
  init();
  try {
    Document document=sDocumentBuilder.parse(file);
    Element resources;
    NodeList list=document.getElementsByTagName(ELEMENT_RESOURCES);
    if (list == null || list.getLength() == 0) {
      resources=document.createElement(ELEMENT_RESOURCES);
      document.appendChild(resources);
    }
 else {
      resources=(Element)list.item(0);
    }
    return create(document,resources);
  }
 catch (  IOException|SAXException e) {
    throw new IllegalStateException("Unable to parse the resource file you passed. Make sure it is properly formatted",e);
  }
}

public static ResourcesPoet create ( File file ) { init ( ) ; try { Document document = sDocumentBuilder . parse ( file ) ; Element resources ; NodeList list = document . getElementsByTagName ( ELEMENT_RESOURCES ) ; if ( list == null || list . getLength ( ) == 0 ) { resources = document . createElement ( ELEMENT_RESOURCES ) ; document . appendChild ( resources ) ; } else { resources = ( Element ) list . item ( 0 ) ; } return create ( document , resources ) ; } catch ( IOException | SAXException e ) { throw new IllegalStateException ( "Unable to parse the resource file you passed. Make sure it is properly formatted" , e ) ; } }
creates a builder on top of the current resources xml file
