954,157 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

XPath getting parent node

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.

Nohup Files

scott_rider
Newbie Poster
10 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

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.

scott_rider
Newbie Poster
10 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You