Reputation: 31
How do I query XML data source in SSRS so that two parent-child hierarchies are returned? For example
<parent>
<child1>
<child2>
<child3>
<a1>1</a1>
<b1>2</b1>
</child3>
<child4>
<c1>1</c1>
<d1>2</d1>
</child4>
</child2>
</child1>
</parent>
How do I query this XML so that I get a1,b1,c1,d1 as a result set?
Upvotes: 3
Views: 794
Reputation: 550
The below example should give you the results you are looking for:
<Query>
<ElementPath IgnoreNamespaces="True">
parent{}/child1{}/child2{child3 {a1,b1}, child4{c1,d1}}
</ElementPath>
</Query>
Upvotes: 1