declare @xmlVal xml
set @xmlVal =
'<user>
<token><id>ABC123</id><endDate>2013-06-16 18:48:50.111</endDate></token>
<token><id>XYX456</id><endDate>2014-01-01 18:48:50.111</endDate></token>
</user>'
I need the entire token node as xml where id=ABC123 so the out put will be :
<token>
<id>ABC123</id>
<endDate>2013-06-16 18:48:50.111</endDate>
</token>