# Stubs for networkx.readwrite.graphml (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Optional

def write_graphml_xml(
    G,
    path,
    encoding: str = ...,
    prettyprint: bool = ...,
    infer_numeric_types: bool = ...,
): ...
def write_graphml_lxml(
    G,
    path,
    encoding: str = ...,
    prettyprint: bool = ...,
    infer_numeric_types: bool = ...,
): ...
def generate_graphml(G, encoding: str = ..., prettyprint: bool = ...): ...
def read_graphml(path, node_type: Any = ..., edge_key_type: Any = ...): ...
def parse_graphml(graphml_string, node_type: Any = ...): ...

class GraphML:
    NS_GRAPHML: str = ...
    NS_XSI: str = ...
    NS_Y: str = ...
    SCHEMALOCATION: Any = ...
    unicode: Any = ...
    long: Any = ...
    types: Any = ...
    xml_type: Any = ...
    python_type: Any = ...
    convert_bool: Any = ...

class GraphMLWriter(GraphML):
    myElement: Any = ...
    infer_numeric_types: Any = ...
    prettyprint: Any = ...
    encoding: Any = ...
    xml: Any = ...
    keys: Any = ...
    attributes: Any = ...
    attribute_types: Any = ...
    def __init__(
        self,
        graph: Optional[Any] = ...,
        encoding: str = ...,
        prettyprint: bool = ...,
        infer_numeric_types: bool = ...,
    ) -> None: ...
    def attr_type(self, name, scope, value): ...
    def get_key(self, name, attr_type, scope, default): ...
    def add_data(
        self, name, element_type, value, scope: str = ..., default: Optional[Any] = ...
    ): ...
    def add_attributes(self, scope, xml_obj, data, default): ...
    def add_nodes(self, G, graph_element): ...
    def add_edges(self, G, graph_element): ...
    def add_graph_element(self, G): ...
    def add_graphs(self, graph_list): ...
    def dump(self, stream): ...
    def indent(self, elem, level: int = ...): ...

class IncrementalElement:
    xml: Any = ...
    prettyprint: Any = ...
    def __init__(self, xml, prettyprint) -> None: ...
    def append(self, element): ...

class GraphMLWriterLxml(GraphMLWriter):
    myElement: Any = ...
    infer_numeric_types: Any = ...
    xml: Any = ...
    keys: Any = ...
    attribute_types: Any = ...
    def __init__(
        self,
        path,
        graph: Optional[Any] = ...,
        encoding: str = ...,
        prettyprint: bool = ...,
        infer_numeric_types: bool = ...,
    ) -> None: ...
    def add_graph_element(self, G): ...
    def add_attributes(self, scope, xml_obj, data, default): ...
    def dump(self): ...

write_graphml = write_graphml_xml
write_graphml = write_graphml_lxml

class GraphMLReader(GraphML):
    node_type: Any = ...
    edge_key_type: Any = ...
    multigraph: bool = ...
    edge_ids: Any = ...
    def __init__(self, node_type: Any = ..., edge_key_type: Any = ...) -> None: ...
    xml: Any = ...
    def __call__(self, path: Optional[Any] = ..., string: Optional[Any] = ...): ...
    def make_graph(self, graph_xml, graphml_keys, defaults, G: Optional[Any] = ...): ...
    def add_node(self, G, node_xml, graphml_keys, defaults): ...
    def add_edge(self, G, edge_element, graphml_keys): ...
    def decode_data_elements(self, graphml_keys, obj_xml): ...
    def find_graphml_keys(self, graph_element): ...
