def METHOD_NAME(cls, elem):
    """Constructor from etree.Element class, with checking for valid types and values"""
    # new the class
    this = super(Parameter,cls).__new__(cls)
    # init the class with tag
    super(Parameter,this).__init__('Parameter')
    # add the named items
    for el in elem.items():
        this.set(el[0],el[1])
    mytype = this.get("type")
    myval = this.get("value")
    try:
        this.setType(mytype) #validation
        this.setValue(myval) #validation
    except RuntimeError as err:
        raise RuntimeError(str(err)+"\n from xml entry: \"%s\""%str(elem.attrib))
    return this