Xpath to select all attributes with specific attribute

thangdragon1569

New Member
I want generate list with column: Computer, Product Name, License Key from xml file:\[code\]<RecoverKeys> <Key> <Data name="Computer" value="http://stackoverflow.com/questions/14501043/john"/> <Data name="Product Name" value="http://stackoverflow.com/questions/14501043/Microsoft Office Professional Hybrid 2007"/> <Data name="License Key" value="http://stackoverflow.com/questions/14501043/xxxx-xxxx-xxxx-xxxx-xxxx"/> <Data name="Product ID" value="http://stackoverflow.com/questions/14501043/123123-345435-3451345-3453453"/> <Data name="User" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Company" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Auth. Key" value="http://stackoverflow.com/questions/14501043/N/A"/> </Key> <Key> <Data name="Computer" value="http://stackoverflow.com/questions/14501043/john"/> <Data name="Product Name" value="http://stackoverflow.com/questions/14501043/Roxio My DVD 9.0"/> <Data name="License Key" value="http://stackoverflow.com/questions/14501043/34756674"/> <Data name="Product ID" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="User" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Company" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Auth. Key" value="http://stackoverflow.com/questions/14501043/N/A"/> </Key> <Key> <Data name="Computer" value="http://stackoverflow.com/questions/14501043/adam"/> <Data name="Product Name" value="http://stackoverflow.com/questions/14501043/Roxio My DVD 10.0"/> <Data name="License Key" value="http://stackoverflow.com/questions/14501043/456456456"/> <Data name="Product ID" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="User" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Company" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Auth. Key" value="http://stackoverflow.com/questions/14501043/N/A"/> </Key> <Key> <Data name="Computer" value="http://stackoverflow.com/questions/14501043/tom"/> <Data name="Product Name" value="http://stackoverflow.com/questions/14501043/photoshop"/> <Data name="License Key" value="http://stackoverflow.com/questions/14501043/2342342423423"/> <Data name="Product ID" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="User" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Company" value="http://stackoverflow.com/questions/14501043/N/A"/> <Data name="Auth. Key" value="http://stackoverflow.com/questions/14501043/N/A"/> </Key> </RecoverKeys>\[/code\]I'm used XPath in Keetle Spoon for first column: \[code\]//Data[@name='Computer']/@value\[/code\] but I get result:johnjohnjohnjohnbut I want:johnjohnadam tom
 
Back
Top