Sorry for the simplicity, but this one is eluding me , here is the xml
<tarification cle="i54534452">
<gamme reference="new-securite-sante">
<tarif formule="NS1">26.12</tarif>
<tarif formule="NS2">29.08</tarif>
</gamme>
<gamme reference="new-equilibre-sante">
<tarif formule="125">32.92</tarif>
<tarif formule="150">42.20</tarif>
<tarif formule="200">52.04</tarif>
</gamme>
<gamme reference="new-full-sante">
<tarif formule="125">36.81</tarif>
<tarif formule="150">43.86</tarif>
<tarif formule="200">52.07</tarif>
</gamme>
<gamme reference="new-performance">
<tarif formule="125">40.47</tarif>
<tarif formule="150">49.18</tarif>
<tarif formule="200">55.91</tarif>
</gamme>
</tarification>
and here is the code C#
XDocument docc = XDocument.Parse(chaineXML);
var formule = docc.Descendants("tarif").Attributes("formule")
.Select(x => x.Value).ToList();
var tarif = docc.Descendants("tarif")
.Select(x => x.Value).ToList();
How i can get the attribu formule and all elements tarif ??? It is showing an exception "Data at the root issue : level is invalid".