KeRNeLith / QuikGraph

Generic Graph Data Structures and Algorithms for .NET
https://kernelith.github.io/QuikGraph/
Microsoft Public License
467 stars 69 forks source link

[Documentation] Invalid information on "Xml Serialization" page #34

Closed Vasar007 closed 3 years ago

Vasar007 commented 3 years ago

Describe the bug Documentation for XML serialization contains an error. Page contains follow sentence:

To deserialize a graph, create the graph instance and call the DeserializeFromXml.

However, there are no such extension for graph. We can deserialize graph only with extension for IXPathNavigable/XmlReader. I think this error is copypaste error from GraphML page because only GraphML serialization has such extension for graph.

Expected behavior It would be nice if the text on the page was changed. Besides, you can add code sample:

using (var xmlReader = XmlReader.Create(stream))
{
    return xmlReader.DeserializeFromXml(
        "Graph",
        "MyVertex",
        "MyEdge",
        reader => new SomeGraph(),
        reader => ParseVertex(reader),
        reader => ParseEdge(reader)
    );
}

Screenshots

image

image

Additional context None.

KeRNeLith commented 3 years ago

Hello,

Oh seems there is indeed an error in what is said on that page.

Thank you for your feedback I have updated the documentation page.