def _parselistofdicts(domobj, containerstr, prefix, listofkeys):
    """Parses what's basically a list of dictionaries contained in a container
    elements of the form
    <container><prefix:key1>VAL1</prefix:key1><prefix:key2>...
    </prefix:key2>...</container>
    and returns it as a list of dictionaries"""
    output = []
    nodelist = domobj.getElementsByTagName(containerstr)
    for node in nodelist:
        item = {}
        children = node.childNodes
        for child in children:
            if child.tagName.startswith(prefix):
                key = child.tagName.replace(prefix, '', 1)
                item[key] = child.firstChild.data
        output.append(item)
    return output
