I have XML stored in an nvarchar(max) field. I realize there is an XML data type, but in this case it is not stored that way. Let's say the XML is structured like the following:
<root>
<hdr>
<name>aj</name>
</hdr>
<dtls>
<dtl>
<price>1</price>
</dtl>
<dtl>
<price>7</price>
</dtl>
<dtl>
<price>3</price>
</dtl>
</dtls>
</root>
What I am trying to do is get the count of detail (dtl) nodes that exist for record. I am sure this is possible with xpath/xquery, I am just not exactly sure how.