
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.GregorianCalendar;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

import javax.xml.bind.*;

// import java content classes generated by binding compiler
import org.nmrml.schema.*;

/*
 * $Id: dx2nmrML.java,v 1.1 2013-07-15 09:49:33 DJ $
 */
 
public class dx2nmrML {
    
    // This sample application demonstrates how to modify a java content
    // tree and marshal it back to a xml data
    
    public static void main( String[] args ) {

        try {

            ObjectFactory objFactory = new ObjectFactory();
            NmrMLType nmrML = (NmrMLType) objFactory.createNmrMLType();
 
            nmrML.setVersion("0.9");
            nmrML.setAccession("S1");

            AcquisitionDimensionParameterSetType acqdimparam = 
                     (AcquisitionDimensionParameterSetType) objFactory.createAcquisitionDimensionParameterSetType();
            acqdimparam.setNumberOfDataPoints(new BigInteger("32768"));
            acqdimparam.setAcquisitionNucleus("1H");
            
            Acquisition1DType.AcquisitionParameterSet acqparam = 
                      (Acquisition1DType.AcquisitionParameterSet) objFactory.createAcquisition1DTypeAcquisitionParameterSet();
            acqparam.setDirectDimensionParameterSet(acqdimparam);

            Acquisition1DType acq1Dtype = (Acquisition1DType) objFactory.createAcquisition1DType();
            acq1Dtype.setAcquisitionParameterSet(acqparam);

            AcquisitionType acqtype = (AcquisitionType) objFactory.createAcquisitionType();
            acqtype.setAcquisition1D(acq1Dtype);

            nmrML.setAcquisition(acqtype);

            // create a JAXBContext capable of handling classes generated into the org.po package
            JAXBContext jc = JAXBContext.newInstance( "org.nmrml.schema" );

            // create a Marshaller and marshal to a file
            Marshaller m = jc.createMarshaller();
            m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true) );
            m.marshal( nmrML, System.out );
System.out.println("OK");
            
        } catch( JAXBException je ) {
            je.printStackTrace();
        }
    }
}

@@ -1,21 +1,20 @@
-%0A
 import java.io.FileI
@@ -559,14 +559,14 @@
  to 
-modify
+create
  a j

Update dx2nmrML.java