java create xml

Solutions on MaxInterview for java create xml by the best coders in the world

showing results for - "java create xml"
Lukas
02 Mar 2017
1Create a DocumentBuilder instance.
2Create a Document from the above DocumentBuilder .
3Create the elements you want using the Element class and its appendChild method.
4Create a new Transformer instance and a new DOMSource instance.
5Create a new StreamResult to the output stream you want to use