/// <summary>
/// Récupère la valeur de l'attribut du noeud recherché dans le fichier de configuration
/// </summary>
/// <param name="xPathString">Expression XPath de recherche du noeud</param>
/// <param name="attribute">Attribut à rechercher</param>
/// <returns>Une ArrayList contenant la liste des attributs recherchés</returns>
public ArrayList GetAttributes(string xPathString, string attribute)
{
// Initilisation des variables
XPathNodeIterator xpathNodeIterator;
XPathExpression expr;
ArrayList attributes = new ArrayList();
// Parcours du fichier XML
try
{
xpathNavigator = xpathDoc.CreateNavigator();
expr = xpathNavigator.Compile(xPathString);
xpathNodeIterator = xpathNavigator.Select(expr);
while (xpathNodeIterator.MoveNext())
{
// On récupère l'attribut
attributes.Add(xpathNodeIterator.Current.GetAttribute(attribute, ""));
}
}
catch (Exception e)
{
}
return attributes;
}