How can i write XML into Silverlight by Master Details Meta Data Object

69 views Asked by At

I am being astonished that there is no new post about silverliht.It will be very harmful to our company because my company still now in silverlight and they have not finished their ERP and they have no chance to change silverlight to other technology at this moment.that for causes we have to study in silverlight.Ok. My questions: I want to convert XML by my master details object. suppose i have a master like table_Personal and details table JOB INFO.so how can i write into single xml file at a time. Thanks.

1

There are 1 answers

4
Peaceman71 On

There are several ways of doing this, but you say you have two tables. You can setup a relationship between these Objects in a DataSet, and then you can easily generate XML from this. DataSet.WriteXML doesn't seem to exist in Silverlight, but the post Convert Dataset to XML is a post on how to implement this.

To find the DataSet in Silverlight you should put using System.Data; in top of the .cs file. Example of DataSet code:

System.Data.DataSet myDataSet = new System.Data.DataSet();
myDataSet.Tables.Add(...);
myDataSet.Tables.Add(...);
myDataSet.Relations.Add(new System.Data.DataRelation(....));