private void addFade(Document doc, Element root, FadeData fade) { Element el = doc.createElement(_cue); Attr attr; attr = doc.createAttribute(_number); attr.setValue(Integer.toString(fade.getCueNumber())); el.setAttributeNode(attr); attr = doc.createAttribute(_uptime); attr.setValue(Integer.toString(fade.getUpTime())); el.setAttributeNode(attr); attr = doc.createAttribute(_downTime); attr.setValue(Integer.toString(fade.getDownTime())); el.setAttributeNode(attr); attr = doc.createAttribute(_upTimeDelay); attr.setValue(Integer.toString(fade.getDelayUpTime())); el.setAttributeNode(attr); attr = doc.createAttribute(_downTimeDelay); attr.setValue(Integer.toString(fade.getDelayDownTime())); el.setAttributeNode(attr); if (fade.getFollowTime() >= 0) { attr = doc.createAttribute(_followtime); attr.setValue(Integer.toString(fade.getFollowTime())); el.setAttributeNode(attr); } if (fade.getNextCue() > 0) { attr = doc.createAttribute(_nextCue); attr.setValue(Integer.toString(fade.getNextCue())); el.setAttributeNode(attr); } CueData cue = fade.getCue(); attr = doc.createAttribute(_discription); attr.setValue(cue.getDescription()); el.setAttributeNode(attr); for (Integer chan : cue.keySet()) addChannel(doc, el, chan, cue.get(chan)); root.appendChild(el); }