I'm tryng opening the file with the LoadFromXml function, like this diagram.LoadFromXml(_openFileDialog.FileName);
then I try to to get the nodes from the diagram,
DiagramNodeCollection mynodecollection = diagram.Nodes;
and then I use a foreach structor to proccess each node and put it into the listbox, like this
foreach (DiagramNode mynode in mynodecollection)
{
_nodeList.Items.Add(mynode);
}
But didn't work.
I also try to open the file as an XmlDocument, and put each node into thge listbox as and XmlNode, somthing like:
XmlDocument myxmldocument=new XmlDocument();
myxmldocument.Load("Sample.xml");
XmlNode mynodes=(XmlNode)myxmldocument.DocumentElement;
foreach (XmlNode mynode in mynodes["Nodes"])
{
_nodeList.Items.Add(mynode);
}
But didn't work.
This is the Xml file that I'm using:
http://tinyurl.com/2exb9shAlso I'm using C# and Visual Studio 2008