|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
OPENXML - element has _xpath in namebut change the name of that element to anything else that does not have _xpath in the name, and it returns the data. Any ideas? DECLARE @sampleXML varchar(8000) SET @sampleXML = N'<ROOT><T1Link_Message_Step_list_Tbl> <optional_execution>5</optional_execution> <message_id>99912345</message_id> <step_id>20120</step_id> <dependent_seq_id_list>0</dependent_seq_id_list> <omit_response>1</omit_response> <cont_exec_path>3333</cont_exec_path> <multi_step>0</multi_step> <sequence_order>5</sequence_order> </T1Link_Message_Step_list_Tbl> </ROOT>' DECLARE @hDoc int EXEC sp_xml_preparedocument @hDoc OUTPUT, @sampleXML SELECT * FROM OPENXML (@hDoc, N'/ROOT/T1Link_Message_Step_list_Tbl',2) WITH ( [message_id] [int] , [step_id] [int] , [sequence_order] [varchar] (50) , [multi_step] [int] , [omit_response] [varchar] (1), [cont_exec_path] [varchar] (255), [dependent_seq_id_list] [varchar] (30) , [UpdateDtm] [datetime] , [optional_execution] [char] (1) , [UpdatedBy] [varchar] (50) , [DBCL_ID] [uniqueidentifier] ) |
|||||||||||||||||||||||