But I don't know how to add the attributes (lines 2 and 3). Notice the "xmlns:xsd". How is this created?
If I have this...
...how do I add attributes?
amerzil co-ed student<br />"Praise be the Code"
Joined: Mar 02, 2005
This is what I've done so far with limited success.
But the result is that it prints everything in one line. How do I get it to print, and structured like in my previous post? I don't want to use crimson.jar. Any other way? I can serialize it to output using the TransformerFactory class. But, it would still print in one line. Everything, including the child nodes.
I'm using the following to display it: ((org.apache.crimson.tree.XmlDocument)doc).write(System.out);