How to get child value and its attribute value with condition in sql server.? How to get this
<CheckoutAttribute ID="9">
<CheckoutAttributeValue><Value>26</Value></CheckoutAttributeValue>
CheckoutAttributeID CheckoutAttributeValue
9 26
from following xml data.
<Attributes>
<CheckoutAttribute ID="4">
<CheckoutAttributeValue><Value>18</Value></CheckoutAttributeValue>
</CheckoutAttribute>
<CheckoutAttribute ID="6">
<CheckoutAttributeValue><Value>22</Value></CheckoutAttributeValue>
<CheckoutAttributeValue><Value>23</Value></CheckoutAttributeValue>
</CheckoutAttribute>
<CheckoutAttribute ID="9">
<CheckoutAttributeValue><Value>26</Value></CheckoutAttributeValue>
<CheckoutAttributeValue><Value>27</Value></CheckoutAttributeValue>
</CheckoutAttribute>
<CheckoutAttribute ID="1">
<CheckoutAttributeValue><Value>1</Value></CheckoutAttributeValue>
</CheckoutAttribute>
</Attributes>