1 package org.ozoneDB.tools.OPP; 9 10 import org.exolab.castor.xml.Unmarshaller; 11 import org.exolab.castor.xml.MarshalException; 12 import org.exolab.castor.xml.ValidationException; 13 import org.ozoneDB.tools.OPP.castor.*; 14 import org.xml.sax.InputSource ; 15 16 21 public class CDHelper { 22 public static OzoneClassDescriptor xml2Descriptor(String _name) throws MarshalException, ValidationException { 23 return xml2Descriptor(new InputSource (_name)); 24 } 25 26 public static OzoneClassDescriptor xml2Descriptor(InputSource _source) throws MarshalException, ValidationException { 27 Unmarshaller umrs = new Unmarshaller(OzoneClassDescriptor.class); 28 return (OzoneClassDescriptor) umrs.unmarshal(_source); 30 } 31 } | Popular Tags |