ser.startTag(NS, "metadata");
if (e.getMetadata() != null) {
ser.startTag(NS, "event");
attribute(ser, "url", e.getUrl());
attribute(ser, "description", e.getDescription());
ser.endTag(NS, "event");
}
for (Entry<Integer, Stage> stageEntry : stageMetadata.entrySet()) {
ser.startTag(NS, "stage");
attribute(ser, "id", "st" + stageEntry.getKey());
attribute(ser, "url", stageEntry.getValue().getUrl());