code: public static XMLStreamReader createXmlStreamReader(Path path, boolean namespaceAware)
        throws JAXBException {
      XMLInputFactory xif = getXmlInputFactory(namespaceAware);
      XMLStreamReader xsr = null;
      try {
        xsr = xif.createXMLStreamReader(new StreamSource(path.toFile()));
      } catch (XMLStreamException e) {
        throw new JAXBException(e);
      }
      return xsr;
    }
docs: Creates an XMLStreamReader based on a file path.
  
  @param path the path to the file to be parsed
  @param namespaceAware if {@code false} the XMLStreamReader will remove all namespaces from all
  XML elements
  @return platform-specific XMLStreamReader implementation
  @throws JAXBException if the XMLStreamReader could not be created