ProcessingInstruction xmlstylesheet = new ProcessingInstruction("xml-stylesheet",
"type=\"text/css\" href=\"standard.css\"");
doc.insertChild(xmlstylesheet, 0);
Comment comment = new Comment(
"An example from Chapter 10 of Processing XML with Java");
doc.insertChild(comment, doc.indexOf(root));
Element desc = new Element("desc", "http://www.w3.org/2000/svg");
root.appendChild(desc);
Text descText = new Text("An example from Processing XML with Java");
desc.appendChild(descText);