Hi,
Is it possible to replace tags in a html file similar to the aspose word. Is there any option available in aspose html to find the tags and replace them?
Hi,
Is it possible to replace tags in a html file similar to the aspose word. Is there any option available in aspose html to find the tags and replace them?
Yes, you can use the TemplateMerge API Methods of Aspose.HTML Cloud for the purpose. Please check sample C# code and documentstest_template_1.zip (525 Bytes) for your reference.
HtmlApi htmlApi = new HtmlApi(ClientId, ClientSecret, "https://api.aspose.cloud");
string templateName = "test_template_1.html";
string dataFile = "templ_merge_data_1.json";
var response = htmlApi.GetMergeHtmlTemplate(templateName,dataFile);
Console.WriteLine(response);
var fileStream = System.IO.File.Create("C:/Temp/TemplateMergeHtml.html");
response.ContentStream.CopyTo(fileStream);