943,525 Members | Top Members by Rank

Ad:
Feb 17th, 2009
0

XPath getting parent node

Expand Post »
I want to get the table node where its decendent node="Nohup Files".
What I have so far is

table/descendant::font[self::text()="Nohup Files"]
table/tr/td/b/font[self::text()="Nohup Files"]

but neither works.

<table>
<tr>
<td><b><font>Nohup Files</font></b></td>
</tr>
</table>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scott_rider is offline Offline
10 posts
since Jun 2006
Feb 17th, 2009
0

Re: XPath getting parent node

In my fumblings, I was able to piece together this: //font[self::text()="Nohup Files"]/ancestor::table.

I had to select the node I wanted, specified the text to search for and the node to return.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scott_rider is offline Offline
10 posts
since Jun 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in XML, XSLT and XPATH Forum Timeline: New to XSLT.... Needed help(urgent)
Next Thread in XML, XSLT and XPATH Forum Timeline: xslt vs javascript





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC