FDG v0.0.4 FDG.Parsers.Graphml
Parses FDG AST into GraphML syntax, for exporting to tools like Gephi.
Summary
Functions
Produces a GraphML XML string from an ast List-of-tuples
Functions
Specs
to_xml([FDG.Parser.node_tuple]) :: String.t
Produces a GraphML XML string from an ast List-of-tuples.
Examples:
iex> FDG.Parsers.Graphml.to_xml([{:node, [label: "A", children: []]}])
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\">\n\t<graph edgedefault=\"directed\" id=\"G\">\n\t\t<key attr.name=\"label\" attr.type=\"string\" for=\"node\" id=\"label\"/>\n\t\t<node id=\"a\" labels=\"A\">\n\t\t\t<data key=\"label\">A</data>\n\t\t</node>\n\t</graph>\n</graphml>"