def get_node_datatext(node):
    """Returns a string with data node text if it exists on the node, otherwise returns an empty string"""
    datatext = ""
    if node.attributes["id"].value:
        for data_node in node.getElementsByTagName('data'):
            if data_node.attributes["key"].value == "d5":
                if data_node.firstChild:
                    datatext = data_node.firstChild.wholeText

    return datatext