Solved

XPath to select all nodes below a specified /tr

Posted on 2011-09-15
3
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 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