private Marshaller createMarshaller(JAXBContext jaxbContext,String schemaPath) throws SAXException, JAXBException {
  Schema schema=XmlParser.getSchema(new String[]{schemaPath});
  Marshaller jaxbMarshaller=jaxbContext.createMarshaller();
  jaxbMarshaller.setSchema(schema);
  jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,true);
  jaxbMarshaller.setProperty(Marshaller.JAXB_ENCODING,"UTF-8");
  return jaxbMarshaller;
}

private Marshaller createMarshaller ( JAXBContext jaxbContext , String schemaPath ) throws SAXException , JAXBException { Schema schema = XmlParser . getSchema ( new String [ ] { schemaPath } ) ; Marshaller jaxbMarshaller = jaxbContext . createMarshaller ( ) ; jaxbMarshaller . setSchema ( schema ) ; jaxbMarshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , true ) ; jaxbMarshaller . setProperty ( Marshaller . JAXB_ENCODING , "UTF-8" ) ; return jaxbMarshaller ; }
create marshaller based on schema for itunes specific metadata format .
