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 ; }
Creates an XMLStreamReader based on a file path .