PDA

Click to See Complete Forum and Search --> : XML - XPath Expression Help! **SOLVED**


Sgt-Peppa
Mar 4th, 2005, 03:32 AM
Given this XmlStructure:


<channel>
<title>ChannelTitle</title>
<link>link</link>
<description>des</description>
<item>
<title>Item1Title</title>
<link>Link1</link>
<description>des1</description>
</item>
<item>
<title>Item2Title</title>
<link>Link2</link>
<description>Link3</description>
</item>
</channel>

i want to read the node description where the title = Item1Title

Heres my try but this aint working:

//channel/item/title['Item1Title']/../description

anyone knows what I am doing wrong?

Thanks,

Stephan

DeadEyes
Mar 4th, 2005, 04:05 AM
try
//channel/item[title='Item1Title']/description

Sgt-Peppa
Mar 4th, 2005, 04:13 AM
:thumb: Excellent! This works! Thanks a lot!

Stephan