I need to delete a particular string in the document builder. Let us take this example Aspose. Now in the document builder i loaded the document. I need to delete the entire string in between < and > tags and Aspose has to be remained with the formatting preserved (Font=Bold). Anyone please help.
No need to involve DocumentBuilder here actually. Just use the Range.Replace method where you can specify the target string by means of a regular expression and the string to replace as an empty string:
doc.Range.Replace(new Regex(@"\<[^\>]+\>"), "");
Note this sample call will delete all strings enclosed in angle brackets throughout the document. You can vary the regex to adjust the string to search and replace (delete) as you need. Read the Find and Replace section of this article to know more: