Search notes:

SQL Server: data type xml

select value

With value, it's possible to extract data from a column whose data type is xml:
create table tq84_xml (
  id  integer primary key,
  doc xml
)

insert into tq84_xml  values (1,
'<tq84>
  <foo>hello wordl</foo>
  <bar>
    <baz>42</baz>
  </bar>
</tq84>'
);

select
  doc.value('(//foo)[1]'    , 'varchar(max)') bar,
  doc.value('(//bar/baz)[1]', 'integer'     ) bar_baz
from
  tq84_xml;

drop table tq84_xml;
Github repository about-MSSQL, path: /t-sql/data-types/xml/select-value.sql

See also

The PowerShell cmdLet noun CSV
XML
data types

Index