def scour(self, prefix, suffix=None, node=None):
    if (node is None):
        root = self.dom.getElementsByTagName(self.dom.documentElement.tagName)[0]
        node = root
    matches = []
    for node in node.childNodes:
        match = 0
        name = node.nodeName
        if name.startswith(prefix):
            if suffix:
                if name.endswith(suffix):
                    match = 1
            else:
                match = 1
        if match:
            tag = Tag(node)
            matches.append(tag)
        matches += self.scour(prefix, suffix, node)
    return matches
def scour(self, prefix, suffix=None, node=None):
    if (node is None):
        root = self.dom.getElementsByTagName(self.dom.documentElement.tagName)[0]
        node = root
    matches = []
    for node in node.childNodes:
        match = 0
        name = node.nodeName
        if name.startswith(prefix):
            if suffix:
                if name.endswith(suffix):
                    match = 1
            else:
                match = 1
        if match:
            tag = Tag(node)
            matches.append(tag)
        matches += self.scour(prefix, suffix, node)
    return matches