J# XML output to screen
Greetings.
I'm having some trouble with what seems to be a simple issue.
I would like to write to a XML document to the System.out however, my
attempts are thwarted.
String exampleNamespaceURI = "http://example.com/2006/ns1";
XmlDocument xmlDocument = new XmlDocument();
XmlElement root = xmlDocument.CreateElement("", "root",
exampleNamespaceURI);
XmlElement test = xmlDocument.CreateElement("", "test",
exampleNamespaceURI);
test.AppendChild(xmlDocument.CreateTextNode("test text"));
root.AppendChild(test);
xmlDocument.AppendChild(root);
xmlDocument.Save("test.xml");
Rather than saving it to a file, I would like to write it to the
screen.
How could I that?
System.out.println("test:" + xmlDocument.toString()); = no good
Trying to use a Stream only yields can't initaite an absract class.
Thank you for the help
Date:Mon, 30 Jul 2007 14:40:35 -0000
Author:
|