Programming/xml

xpath syntax - attribute 검색 및 특정값 얻기

구차니 2019. 8. 8. 11:02

특정 위치중에 attribute가 DB이고 값이 Gene일 경우 해당 Xref element의 ID attribute의 값을 받는 예제

(말이 어렵다 -ㅁ-)

 

/ClinVarSet/ReferenceClinVarAssertion/MeasureSet/Measure/MeasureRelationship/XRef[@DB='Gene']/@ID

[링크 : https://www.w3schools.com/xml/xpath_syntax.asp]