У меня есть
<Model>
<Components>
<Component name="a" id="aaa" molarmass="60.05"/>
<Component name="b" id="bbb" molarmass="18.02"/>
<Component name="c" id="ccc" molarmass="32.04"/>
<Component name="d" id="ddd" molarmass="46.03"/>
</Components>
...
</Model>
и класс
public class ChemieComponent
{
public string Name { get; set; }
public string Id { get; set; }
public double MolarMass { get; set; }
}
Могу ли я с помощью запроса LINQ разобрать эти компоненты на объекты? Как? В конце концов, должен ли я иметь IEnumerable, не так ли?
EDIT
<Points>
<Point name="P1" pressure="1">
<Fractions>
<Fraction id="aaa" value="0.15272159"/>
<Fraction id="bbb" value="0.15272159"/>
</Fractions>
more points...
</Points>