john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

XMLWriter Main

package net.kittyandbear.xml;
import java.io.FileOutputStream;

public class Main
{

    public static void main( String args[] )
    {
        FileOutputStream target = null;
        String fileLocation =  System.getProperty( "user.dir" );
        System.out.println( "Writing files to " + fileLocation );
        XMLWriter xw = new XMLWriter();

        System.out.println( "XML STREAM WRITER: " );
        target = xw.getFileOutputStream( fileLocation + "/xml-test.xml" );
        xw.streamGenerated( target );
        xw.streamGenerated( System.out );

        System.out.println( "\nEVENT FACTORY: " );

        target = xw.getFileOutputStream( fileLocation + "/eventfactory-xml-test.xml" );
        xw.factoryGenerated( target );
        xw.factoryGenerated( System.out );
    }


} //end class

  • « XMLElementAttribute
  • XMLWriter »

Published

Mar 18, 2012

Category

java-classes

~54 words

Tags

  • classes 92
  • java 252
  • main 10
  • xml 22
  • xmlwriter 2