import java.io.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;

/**
 * A driver for an example that illustrates the use of XML
 * for "naive" serialization.
 *
 * @author  Prof. David Bernstein, Jmes Madison University
 * @version 1.0
 */ 
public class PersonDriver
{
    /**
     * The entry point of the application.
     *
     * @args  The command line arguments (ignored)
     */
    public static void main(String[] args) throws Exception
    {
        File file = new File("person.xml");
        
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder        builder = factory.newDocumentBuilder();
        Document               document = builder.parse(file);
        Element                root = document.getDocumentElement();

        Person q = Person.parsePerson(root);

        System.out.println(q.toXML());
    }
}
