|
-
Jul 27th, 2004, 07:30 AM
#1
Thread Starter
Lively Member
How do I get finer control with text() or node() functions
Dudes,
I need to retrieve individual strings from required elements. My xml document is very heavily nested and rather large. I'm starting at the 11th node and digging down further.
Here is my Xpath query:
//*[name()='routeObject']//*[name()='eqGroups']//*[name()='type']//text()
(I have also tried to use node() in place of the text() function but it made no difference)
There are 21 routeObjects, each with their own heavily nested nodes. This is where I'm trying to dig down. However, when I execute this it returns only the first one, if I use SelectSingleNode. If I use SelectNode I return EVERYTHING I need in the collection. Nevertheless, I would like to get them individually, for example I need to retrieve 5,6,9,13,14,..etc So, for 5 I tried to use position()=5 in this query but with no luck It makes sense to use the position function but I can't get the syntax right. Is this the way to do it?
Any ideas?
Thanks
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
|