header.setOTmf(TMX_OTMF);
header.setCreationdate(DateParser.getIsoDateNoMillis(new Date()));
tmx.setHeader(header);
Body body = new Body();
for (Alignment alignment : alignmentList) {
Tu tu = new Tu();
createTuv(tu, sourceLanguageCode, alignment.getSourceSegmentList());
createTuv(tu, targetLanguageCode, alignment.getTargetSegmentList());
if (tu.getTuv().size() > 0) {
body.getTu().add(tu);
}
}
tmx.setBody(body);
TmxMarshallerUnmarshaller.getInstance().marshal(tmx, writer);