Can one XML file hold more than one C# object?
-
Can one XML file hold more than one C# object? Say 2 or 3 ArrayLists? I have more few questions regarding this, but this is basic question to make sense to others I have...
-
Can one XML file hold more than one C# object? Say 2 or 3 ArrayLists? I have more few questions regarding this, but this is basic question to make sense to others I have...
-
OK on simple example, I know how to do it with one object
say something like this is done: XmlSerializer ser = new XmlSerializer(typeof(ArrayList), new Type[] { typeof(SomeClass) }); XmlTextWriter writ = new XmlTextWriter("List.xml", System.Text.Encoding.UTF8); ser.Serialize(writ, SomeList); writ.Close();
Can you show me example, loading for example two ArrayLists each hold diferent type of data... -
OK on simple example, I know how to do it with one object
say something like this is done: XmlSerializer ser = new XmlSerializer(typeof(ArrayList), new Type[] { typeof(SomeClass) }); XmlTextWriter writ = new XmlTextWriter("List.xml", System.Text.Encoding.UTF8); ser.Serialize(writ, SomeList); writ.Close();
Can you show me example, loading for example two ArrayLists each hold diferent type of data...Any idea, i figured out i can make one more arraylist and put anything I want in XML in it... and done... but is there more elegant solution?