Currently, the parser builds a tree whose root node
is a
graph
or
digraph
,
depending on whether the document defines a directed graph or not.
The first child is just a text with the name of the graph, and his siblings
are, either
nodes
or
edges
, in the order in which they appear in the
document.
Each
node
contains a set of children whose
names are the name of the
node
's attributes, and
themselves containing just a text node with the value of each one of the
attributes.
On the other hand, a
edge
is labeled with the
origin of the relationship, and would be a tree node composed of
−−
or
−>
,
depending on whether the document defines a directed graph or not, and
- the name of the
node
which appears as
the target of the relationship.