xpath                
            특정 속성을 포함하는 요소 찾기
        
        
            
    수색…
특정 속성을 가진 모든 요소 찾기
다음 XML을 상상해보십시오.
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
 /root/element[@foobar]
  <element foobar="hello_world" /> 요소를 리턴합니다. 
특정 속성 값을 가진 모든 요소 찾기
다음 XML을 상상해보십시오.
<root>
    <element foobar="hello_world" />
    <element example="this is one!" />
</root>
 다음 XPath 표현식은 다음과 같습니다.
/root/element[@foobar = 'hello_world']
  <element foobar="hello_world" /> 요소를 반환합니다. 
큰 따옴표를 사용할 수도 있습니다 :
/root/element[@foobar="hello_world"]
    
    
    
    
    Modified text is an extract of the original Stack Overflow Documentation
        아래 라이선스 CC BY-SA 3.0
        와 제휴하지 않음 Stack Overflow