// create an instance of DTD marshaller
Marshaller marshaller = new DtdMarshaller();
// map publicId to systemId as it should appear in the resulting XML file
marshaller.mapPublicIdToSystemId("-//DTD Person//EN", "resources/xml/person.dtd");
// create an instance of ObjectModelProvider with the book instance to be marshalled
MappingObjectModelProvider provider = new MappingObjectModelProvider();
provider.mapFieldToElement(Person.class, "dateOfBirth", "", "date-of-birth", SimpleTypeBindings.JAVA_UTIL_DATE);