// Import package
import com.screenscraper.xml.*;
import java.util.Hashtable;
// Create XmlWriter
xmlWriter = new XmlWriter( "C:/students.xml", "students" );
// Student Information
info = new Hashtable();
info.put("name", "John Smith");
info.put("phone", "555-0135");
info.put("gender", "male");
// Add Student Node
student = xmlWriter.addElements( "student", info );
// Close XmlWriter
xmlWriter.close();