How to get instance of object from XML file?
I have XML file o开发者_C百科f object.I want to get instance of that object.But i dont have class.I must read XML and create dynamically how to say class. How to do?
See this page, it can help but you need .NET 4.
I guess you want to read data from an XML into your class. If so, you can use the following way to read the data from a file.
var records = from r in XElement.Load(@"YourFile.xml").Elements("NodeName")
select r;
精彩评论