code: public <T> Optional<T> parseOnce( XmlParser<? extends T> parser )
              throws IOException, SAXException, ParserConfigurationException
      {
          return resolver.parsed( path ) ? Optional.empty() : Optional.of( parse( parser ) );
      }
docs: Parse this XML document with the given parser if it has not already been parsed.
  
  If this XML document has not been parsed already, it is parsed and the result returned. If it has been parsed it
  is not parsed again, instead {@link Optional#empty() nothing} is returned.
  
  @param parser the parser to parse the document with.
  @param <T>    the type of the element produced by parsing the XML document.
  @return the object parsed from the XML document, or {@link Optional#empty() nothing} if the document has been
  parsed before.
  @throws ParserConfigurationException if an XML (SAX) parser cannot be created.
  @throws SAXException                 if parsing the XML document failed.
  @throws IOException                  if reading the XML document failed.