append("<!-- Body content was not serialized -->\n");
b.append(indent).append("</datamodel>\n");
return;
}
for (Iterator iter = data.iterator(); iter.hasNext();) {
Data datum = (Data) iter.next();
Node dataNode = datum.getNode();
if (dataNode != null) {
StringWriter out = new StringWriter();
try {
Source input = new DOMSource(dataNode);
Result output = new StreamResult(out);
XFORMER.transform(input, output);
} catch (TransformerException te) {
org.apache.commons.logging.Log log = LogFactory.
getLog(SCXMLSerializer.class);
log.error(te.getMessage(), te);
b.append(indent).append(INDENT).
append("<!-- Data content not serialized -->\n");
}
b.append(indent).append(INDENT).append(out.toString());
} else {
b.append(indent).append(INDENT).append("<data name=\"").
append(datum.getName()).append("\" expr=\"").
append(datum.getExpr()).append("\" />\n");
}
}
b.append(indent).append("</datamodel>\n");
}
}