|
-
Mar 4th, 2005, 04:32 AM
#1
Thread Starter
Hyperactive Member
XML - XPath Expression Help! **SOLVED**
Given this XmlStructure:
Code:
<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
Last edited by Sgt-Peppa; Mar 4th, 2005 at 05:14 AM.
Reason: Solved
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Mar 4th, 2005, 05:05 AM
#2
Re: XML - XPath Expression Help!
try
//channel/item[title='Item1Title']/description
-
Mar 4th, 2005, 05:13 AM
#3
Thread Starter
Hyperactive Member
Re: XML - XPath Expression Help!
Excellent! This works! Thanks a lot!
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|