Example #1
0
 private static XElement ObtenElemento(XElement elemento,
                                       string nombreElemento, string nombreAtributo,
                                       string valorAtributo)
 {
     return(elemento.Descendants(nombreElemento)
            .First(delegate(XElement Elemento)
     {
         XAttribute atributo = Elemento.Attribute(nombreAtributo);
         return atributo != null ? atributo.Value == valorAtributo : false;
     }));
 }