Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Save FlowChart to XML File (Read 6074 times)
IBS
Guest


Save FlowChart to XML File
Nov 14th, 2005 at 2:23pm
Print Post  
Hi,

I want to save the FlowChart to a XML file (serialize it).
I found four methods called SaveTo, SaveToFile, SaveToStream and SaveToString.

But they only save the FlowChart in a binary format.

Is there an convenient method to save the object in a XML file or do I have access to the object that is used by the SaveTo-methods? (Internally these methods must use some kind of object, which is serialized binary, too).

Thanks!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Save FlowChart to XML File
Reply #1 - Nov 14th, 2005 at 4:34pm
Print Post  
Hi,

Use the XmlWriter class. Initialize an XmlWriter instance with a flowchart object, then call the Write method to create an XML document representing the diagram.

Regards,
Stoyan
  
Back to top
 
IP Logged
 
IBS
Guest


Re: Save FlowChart to XML File
Reply #2 - Nov 15th, 2005 at 6:32am
Print Post  
Hi,

thanks for your answer, but can you give a concrete(r) example please?

XmlWriter is abstract, I can't instantiate it. The only inherited class is XmlTextWriter. So I tried to instantiate it with the FlowChart object, but
a) I dont know how to bind the object to the writer and
b) there is no Write method (only WriteStartAttribute and so on)

I did something similar with the XmlSerializer class, but that would mean, I have to make my own class and create new properties, which can be serialized.

XmlSerializer xs = new XmlSerializer(typeof(FlowChart));

creates an error, (error reflecting type FlowChart).

That approach would be very inconvenient and time intensive.

Thanks for answer!

  
Back to top
 
IP Logged
 
IBS
Guest


Re: Save FlowChart to XML File
Reply #3 - Nov 15th, 2005 at 6:39am
Print Post  
Oh, I just found the indFusion.FlowChartX.Xml.XmlWriter Smiley

I'll just try it with that...
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Save FlowChart to XML File
Reply #4 - Nov 15th, 2005 at 7:28am
Print Post  
Hi,

You use the Flowchart.NET control, right ? Yes, the XmlWriter is in the MindFusion.FlowChartX.Xml namespace there.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint