This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I have two TabItem which allows the user to draw two different diagrams. Then, the user can save both diagrams in one xml file. Is that any method can be used to serialize the diagrams and deserialize the diagrams? Thank.
|
|
|
|
|
Hi Janice, The diagramming component will allow you to serialize a single diagram but you could make it so that you save to one file by creating your own XML file. Something like: <MySavedXmlFormat> You could then load this using a process of getting the XML nodes out and deserializing that into the diagram you wish to create. I hope that helps, John-Daniel Trask |
|
|
|
|
Hi, John-Daniel Trask, Very thank for your suggestion, may you give more information about how can i make my own xml file with the diagramming components. Then, where should i place it in my project. I am so sorry because i am very new to the wpf and c# language. Thank a lot for you help. |
|
|
|
|
Hello Janice, The .NET Framework contains a number of APIs for creating XML files, of which the one most relevant to the diagramming components is XmlWriter. For details of using XmlWriter see the MSDN documentation. You can get help with .NET Framework questions such as "how to create a XML file using XmlWriter" on general programming forums such as MSDN Forums or Stack Overflow. We're not in a position to provide .NET programming guidance outside the scope of our specific components and APIs. |
|
|
|
|
Hello Ivan, Thank a lots for you suggested forums, very useful for me to refer. Here, i got some questions about the way to serialize the two different flow diagram models. As i mentioned in prevoius post, i would like to serialize two flow diagrams in a single xml file. Then, i am trying to create my own xml file using xmlwriter. But, the problem is i unable to serialize the FlowDiagramModel that being created by Mindscape since there is a complete xml file. Is that any way for me to create it? I already declared two FlowDiagramModel which named as "diagram" and "diagram1". FlowDiagramModel diagram = new FlowDiagramModel(); In order to create a new xml file, i am trying to use the following source code. writer.WriteStartDocument(); When i try to save the diagram, i am getting a error message that "Token StartElement in state End Document would result in an invalid xml document". Is that any way that allows me to create my own xml at the same time using the FlowDiagramXmlSerializer. Thank you! |
|
|
|