XML question
If you have a XML like this
set XMLSource to {{
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Report>
<TestCaseList>
<TestCaseData>
<TestCase>
<TestCaseId>1234</TestCaseId>
<Name>Test1</Name>
</TestCase>
<TestCase>
<TestCaseId>1235</TestCaseId>
<Name>Test2</Name>
</TestCase>
</TestCaseData>
</TestCaseList>
</Report>
</xml>
}}
How do you get the value in both TestCaseId(1234 & 1235) & the Name(Test1 & Test2)?
I read Chapter 16 and I'm still confused.
Thanks,
Jason
set XMLSource to {{
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Report>
<TestCaseList>
<TestCaseData>
<TestCase>
<TestCaseId>1234</TestCaseId>
<Name>Test1</Name>
</TestCase>
<TestCase>
<TestCaseId>1235</TestCaseId>
<Name>Test2</Name>
</TestCase>
</TestCaseData>
</TestCaseList>
</Report>
</xml>
}}
How do you get the value in both TestCaseId(1234 & 1235) & the Name(Test1 & Test2)?
I read Chapter 16 and I'm still confused.
Thanks,
Jason
Comments
You demonstrated how to access XML using the following:
Using the same example, how would I get to a specific node?
If I wanted just the Name value from TestCaseId 1234, how would I write a 'where' type condition to get "Name1" from this node
<TestCaseId>1234</TestCaseId>
Thanks!
12/13/12 2:42:05 PM FAILURE Error 6 in XQueryErrorDomain XQueryError:6 - "invalid type"\nExecution Time 0:00:00 scratch.script
Could someone please help me on this?