Java Reference
In-Depth Information
xmlsw.writeStartElement("http://www.tutortutor.ca/
", "recipe");
xmlsw.writeStartElement("http://www.tutortutor.ca/
", "title");
xmlsw.writeCharacters("Grilled Cheese Sandwich");
xmlsw.writeEndElement();
xmlsw.writeStartElement("http://www.tutortutor.ca/
", "ingredients");
xmlsw.setPrefix("h",
"http://www.w3.org/1999/
xhtml");
xmlsw.writeStartElement("http://www.w3.org/1999/
xhtml", "ul");
xmlsw.writeStartElement("http://www.w3.org/1999/
xhtml", "li");
xmlsw.setPrefix("r",
"http://www.tutortutor.ca/
");
xmlsw.writeStartElement("http://www.tutortutor.ca/
", "ingredient");
xmlsw.writeAttribute("qty", "2");
xmlsw.writeCharacters("bread slice");
xmlsw.writeEndElement();
xmlsw.setPrefix("h",
"http://www.w3.org/1999/
xhtml");
xmlsw.writeEndElement();
xmlsw.writeEndElement();
xmlsw.setPrefix("r",
"http://www.tutortutor.ca/
");
xmlsw.writeEndElement();
xmlsw.writeEndDocument();
xmlsw.flush();
xmlsw.close();
}
catch (FactoryConfigurationError fce)
{
System.err.println("FCE: "+fce);
}
Search WWH ::




Custom Search