Hi All,
I have this data.
declare @xml xml set @xml ='<tr><td>12345</td><td>2343</td><td>abcede</td></tr><tr><td>delete</td><td>ffhfhf</td><td>hfhfh</td></tr>' select @xml
Now my task is, if any one of the <tr> contains 'delete' text in any <td> i have to delete that<tr>.
i have written this
set @xml.modify('delete //tr/td[text()[contains(.,"delete")]]')
but its not removing entire <tr>. what should i apply to get the below result.
<tr><td>12345</td><td>2343</td><td>abcede</td></tr>
Thanks in advance.