I'd like to convert an external XML document without any XSD schema associated with it into a fluent .NET object.
I have a simple XML file like:
<application>
<parameters>
<param></param>
<param></param>
</parameters>
<generation />
<entities>
<entity ID="1">
<PropTest>Test</PropTest>
</entity>
<entity ID="2">
<PropTest>Another Test</PropTest>
</entity>
</entities>
</application>
I'd like to navigate the document like:
var xConfig = new XmlConfig("file.xml");
// testValue should be assigned "Test"
string testValue = xConfig.Generation.Entities.Entity(1).PropTest;
What is the best way to achieve this in .NET 3.5?