I work with XML, which was developed by someone who paid for the level of nesting. Different xml files always look something like this:
<Car>
<Color>
<Paint>
<AnotherUselessTag>
<SomeSemanticBs>
<TheImportantData>
With LINQ, it's easy to get what I want: (not really, but you get the point)
from x in car.Descendants("x")
from y in x.Descendants("y")
from z in y.Descendants("z")
select z.WhatIWant();
I ask, is there a better way to do this? Some way to navigate the DOM with Linq?
source
share