Monday, 1 August 2011

Adding an Element Using JDOM

   

import org.jdom.Document;
import org.jdom.Element;

public class MainClass {
  public static void main(String args[]) {

    Document doc = new Document(new Element("games"));

    Element newGame = new Element("game").setText("Final Fantasy");

    doc.getRootElement().addContent(newGame);

  }

}

   
    
  

No comments:

Post a Comment