I have been driving myself up the wall with this one.
I have a file containing information about photographs and their tags. I want to be able to find photos with certain tags or parts of tag. A section of the file is shown below.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!--This XML represents photograph names and the tags extracted from them-->
<photodatabase>
     <info>
          <lastproduced>18/05/2011 19:34:15</lastproduced>
     </info>
     <photo filename="06501.JPG" relativefilepath="\Non-Work\06501.JPG">
          <tag>Places/Great Britain/Scotland/Cardoness</tag>
          <tag>Container/Paterson Green Slide Box - Family and Backwater Contract 1</tag>
          <tag>Years/1964</tag>
     </photo>
     <photo filename="06502.JPG" relativefilepath="\Non-Work\06502.JPG">
          <tag>Places/Great Britain/Scotland/Cardoness</tag>
          <tag>Container/Paterson Green Slide Box - Family and Backwater Contract 1</tag>
          <tag>Years/1964</tag>
     </photo>
     <photo filename="06503.JPG" relativefilepath="\Non-Work\06503.JPG">
          <tag>Container/Paterson Green Slide Box - Family and Backwater Contract 1</tag>
          <tag>Years/1964</tag>
          <tag>Places/Great Britain/Scotland/Cardoness</tag>
     </photo>
</photodatabase>
Using an XMLDOMDocument I have tried a search patterns...
...SelectNodes("photodatabase/photo[contains(tag, 'Places/Great Britain/Scotland')]").
And ...SelectNodes("photodatabase/photo[starts-with(tag, 'Places/Great Britain/Scotland')]").
These return "06501.JPG" and "06502.JPG" but not "06503.JPG". The difference being that "<tag>Places/Great Britain/Scotland/Cardoness</tag>" is not the first node.

This doesn't apply to...
"...SelectNodes(photodatabase/photo[tag='Places/Great Britain/Scotland/Cardoness'])".The problem is that the complete path will not always be specified as the user may sometimes

want any photos in Scotland.
I have the feeling that an "axis" is the answer.

Does anyone have any ideas how to accomplish this?

Thank You,
David Rocke.