Document doc = null;
int i=0;
ConvertData cdOut;
Enumeration e = cd.getDocumentEnumeration();
while (e.hasMoreElements()) {
PalmDocument palmDoc = (PalmDocument) e.nextElement();
PalmDB pdb = palmDoc.getPdb();
log("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
log("<AportisDoc>");
Record[] recs = pdb.getRecords();
String docName = palmDoc.getName();
DocDecoder decoder = new DocDecoder();
String text = decoder.parseRecords(recs);
doc = buildDocument(docName, text);
log("</AportisDoc>");