http://www.cnjbb.org/thread.jsp?boardid=46&threadid=43597&pageno=1&perpage=10&mode=block here will make you more quickly learn Java! Not only give a good tutorial, but also have Java cattle to give you Develop plans and answer questions! Cnjsp.org is very good! This article continues to introduce JDOM to generate XML files: (1) First generation of Document objects first, write in the file with the following code (such as file in c: /car.xml): public void WriteTofile (Document doc, String filePath) {try {org.jdom.output.XMLOutputter outputter = new org.jdom.output.XMLOutputter (); outputter.output (doc, System.out); FileWriter writer = new FileWriter (filePath); // Filepath = c: /car.xml outputter.Output (doc, writer); Writer.close ();} catch (java.io iexcection) {E.PrintStackTrace ();}} (2) A simpler XML Document object: XML Version = "1.0" Encoding = "UTF-8"?>