Create an XML Node

    :param graph: Graph used to geneates prefixes
    :param name: Name of the tag
    :param close: Produce closing tag (close=False -> "<tag>", close=True -> "</tag>")
    :param attributes: Dictionary of attributes
    :param text: CapitainsCtsText to put inside the node
    :param complete: Complete node (node with opening and closing tag)
    :param innerXML: XML to append to the node
    :return: String representation of the node
    :rtype: str

def make_xml_node(graph, name, close=False, attributes=None, text="", complete=False, innerXML=""):
    """ Create an XML Node

    :param graph: Graph used to geneates prefixes
    :param name: Name of the tag
    :param close: Produce closing tag (close=False -> "<tag>", close=True -> "</tag>")
    :param attributes: Dictionary of attributes
    :param text: CapitainsCtsText to put inside the node
    :param complete: Complete node (node with opening and closing tag)
    :param innerXML: XML to append to the node
    :return: String representation of the node
    :rtype: str
    """
    name = graph.namespace_manager.qname(name)
    if complete:
        if attributes is not None:
            return "<{0} {1}>{2}{3}</{0}>".format(
                name,
                " ".join(
                    [
                        "{}=\"{}\"".format(attr_name, attr_value)
                        for attr_name, attr_value in attributes.items()
                    ]
                ),
                escape(text),
                innerXML
            )
        return "<{0}>{1}{2}</{0}>".format(name, escape(text), innerXML)
    elif close is True:
        return "</{}>".format(name)
    elif attributes is not None:
        return "<{} {}>".format(
            name,
            " ".join(
                [
                    "{}=\"{}\"".format(attr_name, attr_value)
                    for attr_name, attr_value in attributes.items()
                ]
            )
        )
    return "<{}>".format(name)