Solved

XPath to select all nodes below a specified /tr

Posted on 2011-09-15
3
246 Views
Last Modified: 2012-05-12
I'm trying to cobble together an xpath that will return all rows
below a certain point in the table.

I want all nodes below where this hits.
.//*[@id='DDATransactionTable']/tbody/tr[contains(.,'Posted T')]

Open in new window


Ideas?
Thanks,
-JW
0
Comment
Question by:JustinW
  • 2
3 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 36547429
If you want all child nodes just do
.//*[@id='DDATransactionTable']/tbody/tr[contains(.,'Posted T')]/node()

If you want all nodes below that point
.//*[@id='DDATransactionTable']/tbody/tr[contains(.,'Posted T')]//node()
0
 
LVL 1

Author Comment

by:JustinW
ID: 36548362
the second one looks like the first one,
am I missing something?
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 36551731
first one is just child nodes, second one has a double "//" so it looks to nodes at any depth
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now