asp.net - Insert single xml element into sql like string manipulation -
hi have xml file this
<pictures> <mainimg> <link>http://s.freshnewtracks.com/wp-content/uploads/2012/07/dr_dre_20011.jpeg</link> </mainimg> <img> <title>back</title> <link>http://s.freshnewtracks.com/wp-content/uploads/2012/07/dr_dre_20011.jpeg</link> </img> <web></web> <twitter></twitter> <facebook></facebook> <myspace></myspace> <about></about> </pictures>
i need insert xml sql datatable without using xml file on disk. have seen other examples done using xml file on disk. want typed/string xml without saving disk/bulk link eg like
insert table (xmlcolumn) values (xml string)
is possible? can have controls on elements of xml file each row?
pass xml string stored procedure , xml string @xml xml = null in stored procedure
in sp:
insert table(column_name) select @applicationo_new ,column_name = t.p.value('column_name', 'varchar(20)') @xml.nodes('pictures') t(p);
Comments
Post a Comment