use of com.xenoage.zong.musicxml.types.choice.MxlCreditContent in project Zong by Xenoage.
the class MxlCredit method read.
@NonNull
public static MxlCredit read(XmlReader reader) {
int page = notNull(reader.getAttributeInt("page"), defaultPage);
MxlCreditContent content = null;
while (reader.openNextChildElement()) {
String n = reader.getElementName();
if (n.equals("credit-image")) {
content = MxlImage.read(reader);
reader.closeElement();
break;
} else if (n.equals(MxlCreditWords.elemName)) {
content = MxlCreditWords.read(reader);
// element is already closed at this point
break;
}
reader.closeElement();
}
if (content == null)
throw reader.dataException("empty " + elemName);
return new MxlCredit(content, page);
}
Aggregations