use of com.xenoage.zong.musicxml.types.enums.MxlMode in project Zong by Xenoage.
the class MxlKey method read.
/**
* Returns null, if the key is unsupported.
*/
@MaybeNull
public static MxlKey read(XmlReader reader) {
Integer fifths = null;
MxlMode mode = null;
while (reader.openNextChildElement()) {
String eName = reader.getElementName();
if (eName.equals("fifths")) {
fifths = Parser.parseIntegerNull(reader.getText());
} else if (eName.equals(MxlMode.elemName)) {
mode = MxlMode.read(reader);
}
reader.closeElement();
}
if (fifths != null)
return new MxlKey(fifths, mode);
else
return null;
}