j'ai écrit le code suivant à l'aide XMLDocumentxmlDocument équivalent en XDocument
string Query = @"/ShortcutList/" + Modality;
XmlNodeList nodes = shortcutsXMLDocument.SelectNodes(Query);
if (nodes == null)
{
// if the modality not exists, I will load the Default one
Query = @"/ShortcutList/Default";
nodes = shortcutsXMLDocument.SelectNodes(Query);
}
for (int i = 0; i < nodes[0].ChildNodes.Count; i++)
{
// do something here
}
où shortcutsXMLDocument
est XMLDocument
Comment convertir en utilisant XDocument, je ne ai pas trouver l'équivalent à SelectNodes dans XDocument
une idée s'il vous plaît