I am working on xpath and have some questions. I have the following document:
<?xml version='1.0'?>
<stores>
<store name='Red'>
<computers>
<computer>Dell</computer>
</cpmputers>
</store>
<store name='Green'>
<computers>
</computers>
<features>
<feature>Remote</feature>
</features>
</store>
</stores>
I want to select the name of the store that has feature "Remote" only. I have tried the following, but can not get it to work:
<xsl:value-of select="@name[/features/feature='Remote']"/>
I have only seen example using > or <. How do you use xpath to match characters or strings, such as Remote?
<?xml version='1.0'?>
<stores>
<store name='Red'>
<computers>
<computer>Dell</computer>
</cpmputers>
</store>
<store name='Green'>
<computers>
</computers>
<features>
<feature>Remote</feature>
</features>
</store>
</stores>
I want to select the name of the store that has feature "Remote" only. I have tried the following, but can not get it to work:
<xsl:value-of select="@name[/features/feature='Remote']"/>
I have only seen example using > or <. How do you use xpath to match characters or strings, such as Remote?