> Question: What does the while loop above exactly do? Is that question addressed to me? It reads from the InputStream...
https://github.com/coheigea/testcases/blob/master/apache/santuario/santuario-xml-encryption/src/test/java/org/apache/coheigea/santuario/xmlencryption/EncryptionUtils.java Colm. On Mon, Jul 28, 2014 at 6:47 PM, Marc Giger <[email protected]> wrote: > Hi, > > > XMLStreamReader securityStreamReader = > > inboundXMLSec.processInMessage( > > xmlStreamReader, null, eventListener); > > > > ... > > > while (securityStreamReader.hasNext()) { > > securityStreamReader.next(); > > } > > > > Question: What does the while loop above exactly do? > > > > > Document document = StAX2DOM.readDoc( > > XMLUtils.createDocumentBuilder(false), > > securityStreamReader); return document; > > } > > > > ... > > > The output is: > > result: > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > > When you have found the answer you will see that this is the > expected output from the above code. Also it will be > very easy for you to change the code so that it works > as desired/expected. > > Please share the solution or come back if my tip didn't help you. > > Thanks, > > Marc > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
