We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

write ML file

Thread ID:

Created:

Updated:

Platform:

Replies:

68982 Oct 8,2007 12:49 PM UTC Nov 24,2007 03:15 AM UTC WinForms 2
loading
Tags: Diagram
Alex
Asked On October 8, 2007 12:49 PM UTC

hi
I want to write a program that creates xml file from my diagram....
I used SaveSoap, but its not my require.
I need a program that works revers the ORGLAYOUT sample....
at the other hand i need to create a xml file with multi columns as parentNode and ChildNods ....
plz help me
thanx

J.Nagarajan [Syncfusion]
Replied On October 23, 2007 04:10 AM UTC

Hi Alex ,

Kindly accept our sincere apologies for the delay in getting back to you.

The LoadSOAP and SaveSOAP methods use the SOAP XML format to serialize diagrams to files and I / O streams. Please refer to the following code snippet

[C#]
//To save the diagram in Xml format.

this.diagram1.SaveSoap( string FileName);

//To load the diagram in Xml format.

this.diagram1.LoadSoap( string FileName);

I have attached the sample for your reference. In this sample when you click on File->save menuitem you can save the diagram in xml file. When you click on File->open menuitem you can load the diagram from the xml file.

http://websamples.syncfusion.com/samples/Diagram.Windows/F68983/main.htm

Please refer to the sample and let me know if this helps.

Regards,
Nagaraj

J.Nagarajan [Syncfusion]
Replied On November 24, 2007 03:15 AM UTC

Hi Alex ,

Kindly accept my sincere apologies for the delay in getting back to you.

If your intention is to write the label's text in Xml writter then please refer to the following code snippet.

[C#]

XmlTextWriter textWriter = new XmlTextWriter("..\\..\\myXmFile.xml", Encoding.Unicode);

foreach (INode node in this.diagram.Model.Nodes)
{
if (node is RoundRect)
{
RoundRect rect = node as RoundRect;

textWriter.WriteStartElement("Employees");

textWriter.WriteStartElement("Name");
textWriter.WriteString(rect.Labels[0].Text);
textWriter.WriteEndElement();

textWriter.WriteStartElement("EmployeeID");
textWriter.WriteString(rect.Labels[1].Text);
textWriter.WriteEndElement();

textWriter.WriteEndElement();

}
}
textWriter.Close();


I have attached the sample for your reference.

http://websamples.syncfusion.com/samples/Diagram.Windows/F68983_Nov23/main.htm

Please refer to it and let me know if this helps.

Regards,
Nagaraj


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;