Need info on Replace method

I have a requirement here. In the attached doc you can find few contents in between < and > like
0 0 1 1 10 Intuit 1 1 10 14.0 String label; // e.g Invoice
String key; // e.g

So the list should contain list of data.

If there is no label presents then label should be null. Basically I need to find the individual matching string with the previous node.

Please let me know how it is possible.

Hi Abhradeep,

Thanks for your inquiry. You can achieve your requirement by implementing IReplacingCallback interface. Please use the same approach shared at following documentation link to achieve your requirements.

Could you please share your expected output document here for our reference? We will then provide you more information about your query.

Let me know how to get the previous word of the matched word?

If possible can you please let me know what is the problem with this attached code? why it is giving class cast exception

Thanks I have corrected the problem myself. Thanks for your effort though

Hi Abhradeep,

Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.