The short story....
Step 1) - download the code.
Step 2) - browse the code.
Step 3) - check out this class:
org.commerce.mismo.demo.SampleMismoLoan
...
/**
* This method will:
*
* 1. Create an XML generator
* 2. Crate an instance of a Mismo LoanApplication object
* 3. Pass the LoanApplication instance into the XML generator
* 4. System out the XML representation of the LoanApplication value objects
*
* @param args
*/
public static void main(String[] args) throws Exception {
MismoXmlGenerator mismoXmlGenerator = new MismoXmlGenerator();
LoanApplication mismoApp = SampleMismoLoan.getLoanApplication();
Document mismoXml = mismoXmlGenerator.getMismoXml(mismoApp);
String xmlAsString = XMLUtils.DocumentToString(mismoXml);
System.out.print(xmlAsString);
System.out.print("Done");
}
Step 4) - you're on your own. Good luck.