} else if (className.equals("DocumentEndEvent")) {
value = new DocumentEndEvent(null, null, false);
} else if (className.equals("DocumentStartEvent")) {
Map<String, String> tags = (Map<String, String>) mapping.get("tags");
List<Integer> versionList = (List<Integer>) mapping.get("version");
Version version = null;
// TODO ???
if (versionList != null) {
Integer major = versionList.get(0).intValue();
if (major != 1) {
throw new YAMLException("Unsupported version.");