//Provided by Dave Watt
package com.jxml.quick.examples.content;
import java.util.*;
import java.io.*;
import com.jxml.quick.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import com.jxml.protocol.*;

public class test
{

  public test()
  {
  }

  public ArrayList repNonOptional = new ArrayList();
  public BzGenericString required = new BzGenericString();

  public static void main(String[] args)
  throws Exception
  {
			Protocol.addJXMLProtocolPackage();
    test vTest = new test();
    vTest.invokedStandalone = true;
                QDoc testSchema=CreateTest.createSchema();
    vTest.repNonOptional.add( new BzGenericString("Hello 1") );
    vTest.repNonOptional.add( new BzGenericString("Hello 2") );
    vTest.required = new BzGenericString("Hello 3");
		QDoc testDoc = Quick.createDoc( vTest, testSchema );
		String sXml = Quick.express( testDoc );
		System.out.println( sXml );
		QDoc testDoc2 = Quick.parse( testSchema, new InputSource( new StringReader( sXml ) ) );
		test test2 = (test)Quick.getRoot( testDoc2 );
		QDoc testDoc3 = Quick.createDoc( test2, testSchema );
		String sXML2 = Quick.express( testDoc3 );
		System.out.println( sXML2 );
  }
  private boolean invokedStandalone = false;
}
