I have a table with an XML column that contains 2 nodes that have large base64 rows (images). When I query the database, I want to remove these 2 nodes from the xml returned to the client. I cannot change the table schema (i.e. I cannot split the data in a column). How to remove 2 nodes from xml column using select statement? (The nodes for deleting both contain the text "Image" in their name). Up to 1000 records can be returned in any one request.
Currently my query looks something like this:
select top 1000 [MyXmlData] from [MyTable]
The MyXmlData column contains xml, which looks something like this:
<MyXml>
<LotsOfNodes></LotsOfNodes>
...
<ANode>
...
<MyImage1></MyImage1>
<MyImage2></MyImage2>
...
</ANode>
...
<LotsOfNodes></LotsOfNodes>
...
</MyXml>
source
share