Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 XML in clob - querying tag attributes

Author  Topic 

marekpracz
Starting Member

7 Posts

Posted - 2011-01-22 : 06:03:06
HI All ,

I've got XML in clob , I know already how to select tag values however I don't know how to get tag attribute.
Example of XML:

<?xml version="1.0"?>
<ts:Transaction msgid="46a8ff18" xmlns:ts="http://schemas.com/">
<TransactionSet representation="implicit" scope="entity">
<DateTime dateTimeFormat="YYYY-MM-DD HH24:MI:SS"></DateTimeFormats>
<Source>A</Source>
<Message_Version>1.0.0</Message_Version>
</TransactionSet>
<xt:event operation="DELETE" objectId="58" type_name="event" xmlns:xt="http://schemas.com">
<Event_Type>I</Call_Type>
<event_ID>80</Call_ID>
</xt:event>
</ts:Transaction>

so I do know how to get to event_ID '80' , what I'm after is operation="DELETE" and I would particularly want to option 'DELETE' value because of course I've got there other types, not only deletes.

Thanks
Mark

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-01-22 : 09:03:53
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=155444



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -