[XPath] Problème de sélection de valeur XML
Bonjour,
J'ai créé un fichier xml de configuration de mon application qui est de cette forme :
Code:
1 2 3 4 5 6 7 8 9 10 11
| <?xml version="1.0" encoding ="Windows-1252" ?>
<BDD>
<Table>
<Nom title ="TableEquip" >[Data].[dbo].[ListEquip]</Nom>
<Nom title ="TableTpsFP" >[Indicateurs_Production].[dbo].[TpsFP]</Nom>
</Table>
<ChaineConnec>
<Nom title="ChaineGene">val1</Nom>
<Nom title="ChaineMeS" >val2</Nom>
</ChaineConnec>
</BDD> |
Quand j'exécute ce code :
Code:
1 2 3 4 5 6 7
| XmlDocument doc = new XmlDocument();
doc.Load("C:\file.xml");
XPathNavigator navigateur = doc.CreateNavigator();
XPathNodeIterator node = navigateur.Select("/BDD/Table/Nom[@title='TableEquip']");
String tmp = node.Current.Value; |
Je m'attend à ce que la variable "tmp" contienne "[Data].[dbo].[ListEquip]" hors celle-ci contient "[Data].[dbo].[ListEquip][Indicateurs_Production].[dbo].[TpsFP]Val1Val2"
En gros toute mes valeurs alors que j'ai bien mis un filtre :(.
D'où cela peut il venir ?