Select values from XML in TSQL

with xmlnamespaces(default 'urn://com.sandvik.smc.doc.connect/1.0')
select
m.[date] AS Date,
cast(replace(cast(m.inputmessage as nvarchar(max)), 'encoding="UTF-8"', '') as XML).value('(/acknowledge_sales_order/data_area/sales_order/sales_order_header/sales_order_hdr_process/order_source_descriptor/order_source/node())[1]', 'nvarchar(255)') AS 'Order Source',
cast(replace(cast(m.inputmessage as nvarchar(max)), 'encoding="UTF-8"', '') as XML).value('(/acknowledge_sales_order/data_area/sales_order/sales_order_header/sales_order_hdr_basic/sop_company_1/node())[1]', 'nvarchar(255)') AS Company,
cast(replace(cast(m.inputmessage as nvarchar(max)), 'encoding="UTF-8"', '') as XML).value('(/acknowledge_sales_order/data_area/sales_order/sales_order_header/sales_order_hdr_basic/order_number_7/node())[1]', 'nvarchar(255)') AS 'Order Number'
from
messagelog m
where
date > '2016-10-01 00:00:00'
and OutputMessage = 'Processed message: ACKNOWLEDGE_SALES_ORDER'
order by
date desc