'Initialize an Extractor object, used to instruct the DOM parser
about how to parse a document.'

def __init__(self, label, path, attrs, group=None, group_key=None, group_key_normalize=None):

    self.label = label
    self.group = group
    if (group_key is None):
        self.group_key = './/text()'
    else:
        self.group_key = group_key
    self.group_key_normalize = group_key_normalize
    self.path = path
    if isinstance(attrs, Attribute):
        attrs = [attrs]
    self.attrs = attrs
