- Home /
using xml, linq, and lists
Hello all,
What I am doing is putting instances of a gameobject into a list using the script name attached to the object (List< ScriptName> objects). Then I am able to convert the list into xml, so I end up with:
< ListName>
< object>GameObject(clone) (ScriptName)< /object>
< object>GameObject(clone) (ScriptName)< /object>
< /ListName>
What I cannot figure out is reading the list from xml into a list created in c# using linq. Here is what I have started.
List< ScriptName> objects = new List< ScriptName>();
objects = doc.Descendants ("object").Select (x => (??)x).ToList (); What the issue is I don't know how to read xml into a custom type list, in this case the type is ScriptName. Any help is appreciated!
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Remove duplicates vector y from vector3 list 1 Answer
Read STRING AS XML TO SHOW LIST 1 Answer
Create a component list from other list 0 Answers