package com.jxml.quick.examples.qdom;

import java.io.*;
import java.util.*;
import com.jxml.protocol.*;
import com.jxml.quick.*;

// Import classes for the SAX Parser
import org.xml.sax.*;

public class Main
{
    public static void main(String[] args)
    {
	try
	    {
		Protocol.addJXMLProtocolPackage();
	        QDoc schema=CreateTest.createSchema();
		QDoc doc=Quick.parse(schema,"file:list.xml");
		Quick.express(doc,"out.xml");
		System.out.println();
		ArrayList list=(ArrayList)Quick.getRoot(doc);
		int s=list.size();
		int i;
		for (i=0;i<s;++i)
		    {
			Object obj=list.get(i);
			if (obj instanceof String)
			    System.out.println(obj);
		    }
	    } 
	catch (Exception e)
	    {
		QPE.display(e);
	    }
    }
}
