I've been researching a lot of XML parsing and serializing methods from MSDN. Looking at Linq and XSD.exe there doesn't seem to be a golden solution that stands out as the one I'm looking for.
My question is what is the best method for this, if it exists.
Let's say I have a XML of arbitrary complexity. One that could be satisfiable by classes such as these, assume they are substantial.
public class nameVal
{
string name { get; set; }
object value { get; set; }
}
public class node
{
nameVal self { get; set; }
List<nameVal> properties { get; set; }
List<node> children { get; set; }
};
How would one, from the source of a string or file and using c# and MSDN Libraries achieve this. Some arbitrary way like, foreach(var prop in node) trunk.properties.add(prop)
I've read through a dozen posts here and articles around the web, but I haven't found a way to do this without precursor knowledge of the XML, or an XSD schema created from the XML. I just found it really odd that there wasn't an arbitrary parsing method for putting an XML document into a generic iterable data structure.
So... methods, libraries, the reason this doesn't exist, any information would be really good.