public static XElement parseXML ( InputStream in ) throws XMLStreamException { XMLInputFactory inf = XMLInputFactory . newInstance ( ) ; XMLStreamReader ir = inf . createXMLStreamReader ( in ) ; return parseXML ( ir ) ; }
Parse an XML document from the given input stream . Does not close the stream .