ContentWelcomeProducts Abeona Gaia News Documentation Introduction Swing support Server application Validation XML DOM support Reader Writer Logging Utilities Launcher License Download Hephaistos JavaGantt Services Promote your software Contact Us Links |
XML WriterThis class is designed to write XML files. The reserved XML characters are replaced by standard entities. Class supports the automatic elements nesting. Usage: PrintWriter pw = ... XmlWriter writer = new XmlWriter (pw); writer.addElement ("first"); writer.addAttribute ("value", 50); writer.addElement ("second"); writer.addAttribute ("next", "www"); writer.closeElement ("second"); writer.closeElement ("first"); writer.close (); The code above builds this XML: <?xml version="1.0" encoding="UTF-8" ?> <first value="50"> <second next="www" /> </first>
|