Advertisement
Advertisement
| 04.21.2008 at 02:56PM PDT, ID: 23341253 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: |
DECLARE @hdoc int
DECLARE @doc varchar(1000)
SET @doc=(select cast(XMLProperties as varchar(1000)) from Device where ID =141)
--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @hdoc OUTPUT, @doc
select '<ROOT>'+@doc+'</ROOT>' as XMLProperties
SELECT Description
FROM
OPENXML(@hdoc,'/ROOT', 2) --Use 2 for elementCentric xml not the default of 1
WITH (
Description VARCHAR(100)
)
-- Remove the internal representation.
exec sp_xml_removedocument @hdoc
|