|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Can not select outer node
Hi there, I have the following xml structure <testsuite> <table> <tr> <td>Dummy Table</td> </tr> </table> <table> <tr> <td>Test Case ID</td> <td>Description</td> <td>Expected Result</td> <td>Actual Result</td> <td>Date Executed</td> <td>PASS / Fail</td> <td>Regression Test Suite</td> </tr> <tr> <td>01</td> <td>This test case verifies successful login</td> <td>System successfully authenticates the user and displays user home page if valid username and password are provided</td> <td>As Expected</td> <td>2008/01/23</td> <td>PASS</td> <td/> </tr> <tr> <td>02</td> <td>This test case verifies field validation when the username is omitted during login attempts</td> <td>System remains on login page with the message "Username is required" displayed</td> <td>System remained on login page but message displayed was "UserID is required"</td> <td>2008/01/23</td> <td>FAIL</td> <td/> </tr> <tr> <td>03</td> <td>This test case verifies field validation when the password is omitted during login attempts</td> <td>System remains on login page with the message "Password is required" displayed</td> <td>As Expected</td> <td>2008/01/23</td> <td>PASS</td> <td/> </tr> </table> </testsuite> What I am trying to do analyze a test resut file. The test cases and results are in a <table/> element within an xml file. There can be many <table/> elements in the document. I know the only one I am interested in is the <table/> with the value "Test Case ID" in the first column of the first row. I am trying to get this table so I can process it by grabbing each row and extracting the desired info. I have tried //table/tr[starts-with(td,"Test Case ID")] Which returns the first <tr/> in the correct table but I need the entire table. I think using table[1] somehow should work, but clearly I am not getting this as when I try //table[1]/tr[starts-with(td,"Test Case ID")] nothing is returned. Any help or ideas would be great. I would prefer not to be given the answer, but a push/shove in the right direction would be most beneficial. Thank you in advance -- Sean Tiley sean.tiley@xxxxxxxxx
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







