If the XML is in a variable, you can simply do this:DECLARE @x XML;SET @x='<Field ID="130" Class="Normal" Name="GenderCode"> <Relations TableID="131" TableName="Codes"> <Filter FieldID="1" Type="C" Value="66" /> </Relations></Field>';SELECT c.value('@ID[1]','INT') [ID], c.value('@Name[1]','VARCHAR(32)') [Name], c.value('(Relations/Filter/@Value)[1]','INT') [Value]FROM @x.nodes('./Field') T(c);If your data is in a table, you will need to pick the column from the table and do a cross/outer apply against that column. If you have many Relations nodes or Many Filter nodes, you would need to modify the query to account for that.