xpath                
            Hitta element som innehåller specifika attribut
        
        
            
    Sök…
Hitta alla element med ett visst attribut
Föreställ dig följande XML:
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
 /root/element[@foobar]
  och returnerar <element foobar="hello_world" /> . 
Hitta alla element med ett visst attributvärde
Föreställ dig följande XML:
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
 Följande XPath-uttryck:
/root/element[@foobar = 'hello_world']
  kommer att returnera <element foobar="hello_world" /> elementet. 
dubbla citat kan också användas:
/root/element[@foobar="hello_world"]
    
    
    
    
    Modified text is an extract of the original Stack Overflow Documentation
        Licensierat under CC BY-SA 3.0
        Inte anslutet till Stack Overflow