xpath where clause

pccezvbwlx

New Member
I am trying to build an xpath query on the following xml file:\[code\]<recordGroup> <records> <year>1985</year> <album> <name> album1 </name> <artist>artist1 </artist> <label> labelA</label> </album> <album> <name>album2 </name> <artist>artist2 </artist> <label> labelB</label> </album> </records> <records> <year>1986</year> <album> <name>album3 </name> <artist> artist1 </artist> <label>labelC</label> </album> <album> <name>album4 </name> <artist>artist2</artist> <label> labelA</label> </album> </records></recordGroup>\[/code\]I want to retrieve the following query: select all records (artist, name & year) where label = 'LabelA'.The XML structure might not be appropiate to display this data but I am getting this stream from another software so, I cannot change it. Any suggestions?
 
Back
Top