I have following XML to parse in SQL Server 2008
<Root>
<Document>
<Body>
<Component>
</Component>
</Body>
</Document>
</Root>
I want to retrieve all the <Component> tags in my xml, the issue is that <Document> tag at times might not come, Hence my xpath query of (root/document/body) won't work. Is there way I can get all <Component> tags irrespective of presence of <Document> tag?