xpath                
            Recherche d'éléments contenant des attributs spécifiques
        
        
            
    Recherche…
Trouver tous les éléments avec un certain attribut
Imaginez le XML suivant:
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
/root/element[@foobar]
 et renverra l' <element foobar="hello_world" /> . 
Trouver tous les éléments avec une certaine valeur d'attribut
Imaginez le XML suivant:
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
L'expression XPath suivante:
/root/element[@foobar = 'hello_world']
 renverra l' <element foobar="hello_world" /> . 
des guillemets doubles peuvent également être utilisés:
/root/element[@foobar="hello_world"]
    
    
    
    
    Modified text is an extract of the original Stack Overflow Documentation
        Sous licence CC BY-SA 3.0
        Non affilié à Stack Overflow