XPath
De Linuxmemo.
(Différences entre les versions)
Ligne 2 : | Ligne 2 : | ||
XPath est un langage pour adresser des parties de documents XML, conçu pour être utilisé à la fois par XSLT et XPointer. | XPath est un langage pour adresser des parties de documents XML, conçu pour être utilisé à la fois par XSLT et XPointer. | ||
- | refs: http://xmlfr.org/w3c/TR/xpath/ | + | refs: http://xmlfr.org/w3c/TR/xpath/ http://msdn.microsoft.com/fr-fr/library/ms256115%28v=vs.80%29.aspx |
Tuto: http://www.csharpfr.com/tutoriaux/XPATH-LANGUAGE_536.aspx | Tuto: http://www.csharpfr.com/tutoriaux/XPATH-LANGUAGE_536.aspx |
Version du 8 avril 2013 à 11:43
XPath est un langage pour adresser des parties de documents XML, conçu pour être utilisé à la fois par XSLT et XPointer.
refs: http://xmlfr.org/w3c/TR/xpath/ http://msdn.microsoft.com/fr-fr/library/ms256115%28v=vs.80%29.aspx
Tuto: http://www.csharpfr.com/tutoriaux/XPATH-LANGUAGE_536.aspx
Voici une table de relation que l'on peut établir si on part du principe que le noeud courant est H. Les valeurs peuvent être directement utilisée dans la requête XPath.
Value | Node |
self | H |
parent | B |
child | I |
descendant | I, J, K, L |
descendant-or-self | H, I, J, K, L |
ancestor | B, A |
ancestor-or-self | H, B, A |
preceding | E, D, C, F, G |
preceding-sibling | C |
following | M, N, O, P, Q, R, S, T, U, V, W, X |
following-sibling | - |