T-SQL: Extracting values from XML

preview_player
Показать описание

DECLARE @xml_str xml
SET @xml_str='
?shiporder?
?orderid?889923?/orderid?
?orderperson?John Smith?/orderperson?
?shipto?
?name?Alexey?/name?
?address?Champ elysee 1?/address?
?city?Paris?/city?
?country?France?/country?
?/shipto?
?lines?
?item?
?product?Lager format printer?/product?
?note?Special Edition?/note?
?quantity?2?/quantity?
?price?1090?/price?
?/item?
?item?
?product?Big boxes?/product?
?quantity?100?/quantity?
?price?9.90?/price?
?/item?
?item?
?product?iPhone?/product?
?note?model X?/note?
?quantity?2?/quantity?
?price?1234.56?/price?
?/item?
?/lines?
?/shiporder?'

Рекомендации по теме
Комментарии
Автор

Hi..how to select all values products in one x path or do we have any other way to get pls help.. like value.('//product[1, 2, 3] )

chraghu
join shbcf.ru