def safeGetAttribute(node, attribute):
    """Get an attribute froma node, but return None if it does not exist.
    """
    if not node.hasAttribute(attribute):
        return None
    else:
        return node.getAttribute(attribute)
