Graph serializer to the GraphML format.

Namespace:  QuickGraph.Serialization
Assembly:  QuickGraph (in QuickGraph.dll) Version: 2.4.2.1515 (2.4.2.1515)

Syntax

C#
public class GraphMLGraphSerializer
Visual Basic (Declaration)
Public Class GraphMLGraphSerializer

Remarks

This object serializes outputs to the GraphML (http://graphml.graphdrawing.org/) format.

Examples

The following example takes a graph and serializes it to GraphML format to the Console window. All ISerializableVertexAndEdgeListGraph instance are serializable ([!:Serialization.Representation.AdjacencyGraph] implements this type).

CopyC#
using System.Xml;
using QuickGraph.Serialization;
...

// create human readable xml writer
XmlTextWriter writer = new XmlTextWriter(Console.Out);
writer.Formatting = Formatting.Indented;

// the graph to serialize
ISerializableVertexAndEdgeListGraph g = ...;

// create serializer
GraphMLGraphSerializer ser = new GraphMLGraphSerializer();
// serialize graph
ser.Serialize(writer,g);

Inheritance Hierarchy

System..::.Object
  QuickGraph.Serialization..::.GraphMLGraphSerializer

See Also