public Object read(Element elem) {
return readScript(elem);
}
public void writeScript(Script script, Element elem) {
ScriptEnvironment env = script.getEnvironment();
//os:
String os = env.getOperatingSystem();
if (os != null && !os.equals(ScriptEnvironment.UNKNOWN_OS))
elem.setAttribute("os", os);
//shell:
String shell = env.getShell();
if (shell != null && !shell.equals(ScriptEnvironment.UNKNOWN_SHELL))
elem.setAttribute("shell", shell);
//script:
elem.addContent(new CDATA(script.getText()));