private void init ( InputStream inputStream ) { this . inputStream = inputStream ; currentPath = new LinkedList < Node > ( ) ; nodeQueue = new LinkedList < XmlNode > ( ) ; XMLInputFactory factory = XMLInputFactory . newInstance ( ) ; factory . setProperty ( "javax.xml.stream.isCoalescing" , true ) ; factory . setProperty ( "javax.xml.stream.isReplacingEntityReferences" , true ) ; try { reader = factory . createXMLStreamReader ( inputStream ) ; } catch ( XMLStreamException e ) { throw new XmlReaderException ( e ) ; } }
Initialize XML reader for processing