throw new InvalidXMLException("Parameter missing required 'name' attribute");
Element typeElem = elem.getChild("type");
if (typeElem == null)
throw new InvalidXMLException("Parameter missing required 'type' element");
DataType dataType = parseDataType(typeElem);
String displayName = null;
Element labelElem = elem.getChild("label");
if (labelElem != null)
displayName = labelElem.getText();
Element descriptionElem = elem.getChild("description");
String description = descriptionElem == null ?
null : descriptionElem.getText();
List options = null;
Element optionsElem = elem.getChild("options");
if (optionsElem != null)
options = parseOptions(optionsElem, dataType.getRepresentationClass());
Object defaultValue = null;
Element defaultElem = elem.getChild("default");
if (defaultElem != null)
defaultValue = parseValue(defaultElem.getText(), dataType.getRepresentationClass());
//create parameter:
ParameterDef param = new ParameterDef(name, dataType, description);