Searching for the first matching element after a specific node (XPath and ITunes XML)

cabakov

New Member
it's not nessesary to post my full code because I have just a short questions. I'm searching with XPath in a XML Doc for a text Value. I have a XML Like\[code\]<key>Name</key><string>Dat Ass</string> <key>Artist</key><string>Earl Sweatshirt</string> <key>Album</key><string>Kitchen Cutlery</string> <key>Kind</key><string>MPEG-Audiodatei</string>\[/code\]I have an Expression like this:\[code\]//string[preceding-sibling::key[text()[contains(., 'Name')]]]/text()\[/code\]but this gives me ALL following string-tags, I just want the first one with the Song-Title.greets Alex
 
Back
Top