use of electric.xml.Element in project blue by kunstmusik.
the class Track method loadFromXML.
public static Track loadFromXML(Element data) {
Track retVal = new Track(false);
Elements nodes = data.getElements();
while (nodes.hasMoreElements()) {
Element node = nodes.next();
String nodeName = node.getName();
switch(nodeName) {
case "name":
retVal.name = node.getTextString();
if (retVal.name == null) {
retVal.name = "";
}
break;
case "noteTemplate":
retVal.noteTemplate = node.getTextString();
if (retVal.noteTemplate == null) {
retVal.noteTemplate = "";
}
break;
case "instrumentId":
retVal.instrumentId = node.getTextString();
if (retVal.instrumentId == null) {
retVal.instrumentId = "";
}
break;
case "columns":
{
Elements nodes2 = node.getElements();
while (nodes2.hasMoreElements()) {
retVal.addColumn(Column.loadFromXML(nodes2.next()));
}
break;
}
case "trackerNotes":
{
Elements nodes2 = node.getElements();
while (nodes2.hasMoreElements()) {
retVal.trackerNotes.add(TrackerNote.loadFromXML(nodes2.next()));
}
break;
}
}
}
return retVal;
}
use of electric.xml.Element in project blue by kunstmusik.
the class OpcodeList method loadFromXML.
/* SAVE/LOAD METHODS */
public static OpcodeList loadFromXML(Element data) {
OpcodeList retVal = new OpcodeList();
Elements nodes = data.getElements();
while (nodes.hasMoreElements()) {
Element node = nodes.next();
UserDefinedOpcode udo = UserDefinedOpcode.loadFromXML(node);
retVal.addOpcode(udo);
}
return retVal;
}
use of electric.xml.Element in project blue by kunstmusik.
the class UDOLibrary method saveAsXML.
public Element saveAsXML() {
Element retVal = new Element("udoLibrary");
retVal.addElement(rootUDOCategory.saveAsXML());
return retVal;
}
use of electric.xml.Element in project blue by kunstmusik.
the class Field method loadFromXML.
public static Field loadFromXML(Element data) throws Exception {
Field field = new Field(false);
Elements nodes = data.getElements();
while (nodes.hasMoreElements()) {
Element node = nodes.next();
String nodeName = node.getName();
if (nodeName.equals("parameter")) {
field.parameters.add(Parameter.loadFromXML(node));
}
}
return field;
}
use of electric.xml.Element in project blue by kunstmusik.
the class Field method saveAsXML.
public Element saveAsXML() {
Element retVal = new Element("field");
for (Iterator it = parameters.iterator(); it.hasNext(); ) {
Parameter param = (Parameter) it.next();
retVal.addElement(param.saveAsXML());
}
return retVal;
}
Aggregations