'Finds a subnode matching `path` and returns its inner text if
it has no base64 attribute or its base64 decoded inner text if
it has it.'

def decode_binary_node(self, path):

    nodes = self.node.findall(path)
    try:
        subnode = nodes[0]
    except IndexError:
        return ''
    encoded = distutils.util.strtobool(subnode.get('base64', 'false'))
    if encoded:
        return subnode.text.decode('base64', 'strict')
    else:
        return subnode.text
