I generate a XMLDocument based on a dataset by binding the dataset to the XMLDocument object and then display it to user in vb.net. I have a requirement in which certain tags to contain cdata sections rather than text value. After generating the XMLDocument how to change only certain tag to cdata section and keeping all else as it is? Or is there a way to modify while binding itself?
Share
You could use the “XmlDocument.CreateCDataSection(string)” method. First search each text string for “<” or “>” characters — or for a full tag “” if known — then use the appropriate method to output the data.