public < T > Optional < T > parseOnce ( XmlParser < ? extends T > parser ) throws IOException , SAXException , ParserConfigurationException { return resolver . parsed ( path ) ? Optional . empty ( ) : Optional . of ( parse ( parser ) ) ; }
Parse this XML document with the given parser if it has not already been parsed .