This is an xpath question,
I xml file that looks likes this there are several of these artists in the xml.
<lib>
<artist>
<name>Katy Perry</name>
<album>
<name>The Official Uk Top 40 Singles Chart 27-05-2012</name>
<file>
<name>37 Katy Perry - Part Of Me.mp3</name>
</file>
</album>
<album>
<name>Album name 2</name>
<file>
<name>whatever.mp3</name>
</file>
</album>
</artist>
...
</lib>
How can I get all the albums of the artist given an artist name using an XPath ??
It would be like this:
Does that work for what you’re trying to do?
To account for leading or trailing space, or unexpected space between the words, you should be able to do the following: