xpath                
            Elemente suchen, die bestimmte Attribute enthalten
        
        
            
    Suche…
Finde alle Elemente mit einem bestimmten Attribut
Stellen Sie sich folgendes XML vor:
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
 /root/element[@foobar]
  und gibt das <element foobar="hello_world" /> . 
Finden Sie alle Elemente mit einem bestimmten Attributwert
Stellen Sie sich folgendes XML vor:
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
 Der folgende XPath-Ausdruck:
/root/element[@foobar = 'hello_world']
  gibt das <element foobar="hello_world" /> . 
doppelte Anführungszeichen können auch verwendet werden:
/root/element[@foobar="hello_world"]
    
    
    
    
    Modified text is an extract of the original Stack Overflow Documentation
        Lizenziert unter CC BY-SA 3.0
        Nicht angeschlossen an Stack Overflow