serializin an Ellipse
-
Hi i am using ms Glee and visual studio Graph class and i have created an ellipse and displayed on Glee gview tool so i want serialize this ellipse in an xml file here is what i have done in creating an ellipse. Graph g = new Graph("graph"); g.AddNode("Ellipse"); gViewer1.Graph = g; here is where i am trying to serialise but it XmlSerializer mySerializer = new XmlSerializer(typeof(Graph)); XmlTextWriter myWriter = new XmlTextWriter(@"C:\users\dake10\documents\jacob\motors.xml", Encoding.UTF8); Graph g = new Graph(""); g.AddNode("House"); mySerializer.Serialize(myWriter,g); I get this error message"Microsoft.Glee.Drawing.Graph cannot be serialized because it does not have a parameterless constructor."
Mamphekgo
-
Hi i am using ms Glee and visual studio Graph class and i have created an ellipse and displayed on Glee gview tool so i want serialize this ellipse in an xml file here is what i have done in creating an ellipse. Graph g = new Graph("graph"); g.AddNode("Ellipse"); gViewer1.Graph = g; here is where i am trying to serialise but it XmlSerializer mySerializer = new XmlSerializer(typeof(Graph)); XmlTextWriter myWriter = new XmlTextWriter(@"C:\users\dake10\documents\jacob\motors.xml", Encoding.UTF8); Graph g = new Graph(""); g.AddNode("House"); mySerializer.Serialize(myWriter,g); I get this error message"Microsoft.Glee.Drawing.Graph cannot be serialized because it does not have a parameterless constructor."
Mamphekgo
You can't serialize a Glee graph object using an xmlserializer.As the exception says it doesn't have a parameterless constructor. If your aim is to draw graph,I think still graphviz is the better choice to GLEE