'Create instance from given XML (sub)tree.
@param xmlTree: XML (sub)tree corresponding to the <ruleset> element
@param filename: filename this ruleset originated from (for
reporting purposes)'

def __init__(self, xmlTree, filename):

    root = xmlTree
    self.name = None
    self.platform = 'default'
    self.defaultOff = None
    self.rules = []
    self.targets = []
    self.exclusions = []
    self.filename = filename
    self.tests = []
    self.determine_test_application_run = False
    for (attrName, xpath, conversion) in self._attrConvert:
        elems = root.xpath(xpath)
        if elems:
            setattr(self, attrName, conversion(elems))
    self._addTests()
