A GML parser. This parser should understand the whole GML syntax. It transforms any unknown tag into an attribute. Depending on the location of the unknown tag, the attribute is added to the graph, to nodes or to the edges. The "graphics" attributes are, as far as possible, transformed into "ui.style" attributes that are merged with the style sheet. The understood graphics tags are "x", "y", "z", "w", "h", "d" for position and size, "fill" for the background color (becomes "fill-color"), "outline" (becomes "stroke-color"), "type" (becomes "shape", the known shapes being the ones of the GraphStream CSS, plus the "ellipse" tag wich maps to "circle" and the "rectangle" tag that maps to "box"), "outline_width" (becomes "stroke-width", in pixels). If edges have no "id" tag, the id is the concatenation of the source and target node identifiers separated by a "_" character and a random number. You can declare nodes either with the full declaration:
node [ Id "foo" ]
Which is useful when adding attributes to it. Or you can use a lighter declaration with:
node "foo"
You can also remove nodes and edges by using:
-node "foo" del-node "foo" -node [ Id "foo" ] del-node [ Id "foo" ]
And the same for edges with "-edge" or "del-edge". All the dynamic events of GraphStream are supported as an extension. You can add or remove attributes to or from a node or edge using a minus sign in front of the attribute name and following the attribute name by []. You can remove a node or edge using a minus sign in front of the node and edge tags:
-node [ id "foo" ]
Or
-node "foo"
You can change the attributes of a node or edge using a plus sign in front of the node and edge tags:
+node [ id "foo" someAttribute "added" -removedAttribute [] ]
Be careful, that files exported with the dynamic extensions will not be compatible with most GML readers of other programs. The standard extension for GML files is ".gml". If your file contains dynamic additions, you can use the ".dgml" (Dynamic GML) extensions. The parser will handle both dynamic and non dynamic files with the extension ".gml".