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.
Unfortunately, activation email could not send to your email. Please try again.

write different XML file

Thread ID:

Created:

Updated:

Platform:

Replies:

68983 Oct 8,2007 08:50 AM Nov 23,2007 10:14 PM Windows Forms 5
loading
Tags: Diagram
Alex
Asked On October 8, 2007 08:50 AM

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 12:10 AM

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

Alex
Replied On October 27, 2007 12:01 PM

dear nagaraj
thanx for ur reply
but saveSoap isnot useful for me...
lets explain...
plz look at ORGLAYOUT sample ,
that organization layout generats from a XML file.
i want to create xml file like that .
at the other hand i want to create a table with 3 fields , 1 - ID, 2- ParentID, 3- Child ID
plz help me.
best regards
alex.

J.Nagarajan [Syncfusion]
Replied On October 29, 2007 08:01 PM

Hi Alex ,

The SaveSoap is used to serialize the diagram in xml format. Currently the diagram does not support to write the node's information in the xml file. It only allows the user to load the datas from the xml file and the data base. In ORGLAYOUT browser sample load the data from the xml file. Please refer the ORGLAYOUT browser sample and let me know if this helps.

Best regards,
Nagaraj


Martin Szymczak
Replied On November 14, 2007 04:24 PM

I pretty much need the exact same routine. I also need to cycle through the nodes and easily identify the children in a hierarchial fashion. Your intent is to then create a hierarchy expressed in XML. My intent is to create a hierarchy that is loaded into a TreeView. If I figure it out, I let you know. I'll be anxiously watching responses to your thread.


J.Nagarajan [Syncfusion]
Replied On November 23, 2007 10:14 PM

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.

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.

;