please help Xpath expression

Bztnelaqqfseu

New Member
I have following Xml :\[code\]<thoughts> <thought> <id>1</id> <category>Leadership</category> <what>sometext</what> <who>sometext</who> </thought> <thought> <id>2</id> <category>Leadership</category> <what>sometext</what> <who>sometext</who> </thought> ... 100's of with category Leadership <thought> <id>1</id> <category>Love</category> <what>sometext</what> <who>sometext</who> </thought> <thought> <id>2</id> <category>Love</category> <what>sometext</what> <who>sometext</who> </thought> ... 100's of with category Love ... and so on up to about ten categories</thoughts>\[/code\]I have to select a thought(what and who) of given id and category. I tried following:\[code\]"/thought[id='1']/thought[category="Love"]/what/text()"\[/code\]I am new to xmls and paths. Please help. Thanks in advance
 
Back
Top