Hello, I have a table in an SQL Server database which contains a column of type=XML. I wonder if it is possible to update nodes in that table using XPath expressions?
I have an XML file that looks something like this:
<XMLRoot>
<Date>02/05/2011</Date>
<Misspelled>ABC</Misspelled>
<Customer>Microsoft</Customer>
</XMLRoot>
and I want to update the node "Misspelled" and set it to "Correct". Is this possible to do this with an XPath expression or what it is the best way to do this?
After the update I want the XML to look like this:
<XMLRoot>
<Date>02/05/2011</Date>
<Correct>ABC</Correct>
<Customer>Microsoft</Customer>
</XMLRoot>
Any help is greatly appreciated.
Regards
Kenbla
I have an XML file that looks something like this:
<XMLRoot>
<Date>02/05/2011</Date>
<Misspelled>ABC</Misspelled>
<Customer>Microsoft</Customer>
</XMLRoot>
and I want to update the node "Misspelled" and set it to "Correct". Is this possible to do this with an XPath expression or what it is the best way to do this?
After the update I want the XML to look like this:
<XMLRoot>
<Date>02/05/2011</Date>
<Correct>ABC</Correct>
<Customer>Microsoft</Customer>
</XMLRoot>
Any help is greatly appreciated.
Regards
Kenbla