Graph serializer to the GraphML format.
Namespace:
QuickGraph.SerializationAssembly: 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).
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);
