This content has been marked as final. Show 2 replies
Why??? You usually use an InputStream to create the DOM-Document, not the other way around.
You can write the document to an OutputStream (which is probably what you want). The tool for this is a Transformer, which you instruct to transform the data from a DOM source to a Stream result.
You first create a TransformerFactory() which give you a transformer.
Then create DOMSource and StreamResult objects and call Transform
Read the documentation in javax.xml.transform