Updating a XML stored in BLOB column of a table
450430Nov 5 2009 — edited Nov 6 2009I have a table which contains XML files stored in a BLOB Column. I want to do the following. Is any one can help?
1. The xml file have a node / element Status. I want to update the status.
Example:
<Status>SUBMIT</Status>
2. If the node / element having multiple lines ie., subnodes / sub elements, I want to update a particular sub element. (The sub element name are same or different)
Example1: I want to update third line. ie., 48033 to new value
<Address>
<AddressLine>21557 TELEGRAPH ROAD</AddressLine>
<AddressLine>SOUTHFIELD MI</AddressLine>
<AddressLine>48033</AddressLine>
<AddressLine>UNTD STATES</AddressLine>
</Address>
Example2: I want to update the line PartPrefix. ie., RAJ1 to new value
<ItemNumber>
<ItemId>RAJ1-54603C32-BL</ItemId>
<PartContractBase>5460332</PartContractBase>
<PartPrefix>RAJ1</PartPrefix>
<PartBase>54603C32</PartBase>
<PartSuffix>BL</PartSuffix>
</ItemNumber>
3. If the xml file having any special characters, it is not updated the correct modified xml into the BLOB column.