Does .NET 4.0 have a DLR-enabled XML navigation and reading class? For example, imagine that I have this XML:
<foo>
<bar>foobar is here</bar>
<bar>foobar is also here</bar>
<baz>foobar is not here</bar>
</foo>
Is there an easy way to navigate XML as follows:
var doc = SomeDlrEnabledParser.Parse (xmlString);
foreach (var node in doc.foo.bar)
{
if (node == "foobar is here")
DoSomething();
else
DoSomethingElse();
}
I see many reasons why the approach described above will be problematic, including namespaces, attributes against elements, differentiating collections versus individual elements, encoded XML files, etc.
But most of the XML I'm dealing with is very simple and read-only, and I'm willing to accept reasonable default behaviors in exchange for avoiding the "parentheses and quotation soup" that are common with plain XML in up to 4.0 world.
, "" . , , (, jQuery).
.NET Framework Framework - ? , - DLL DLR?