I am loading an html file that contains unordered list and saving it back to html after some processing. The saved html is not keeping the <ul><li></li></ul>
style as in the original. Here is the test files
source file contents:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css" /><meta name="generator" content="Aspose.Words for .NET 10.7.0.0" /><title></title></head><body><ul type="disc" style="margin-bottom:0pt; margin-top:0pt"><li style="margin-bottom:0pt; margin-top:0pt"><span style="font-family:'Times New Roman'; font-size:12pt">line1</span></li><li style="margin-bottom:14pt; margin-top:0pt"><span style="font-family:'Times New Roman'; font-size:12pt">line2</span></li></ul></body></html>
file contents after save:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css" /><meta name="generator" content="Aspose.Words for .NET 10.7.0.0" /><title></title></head><body><ul type="disc" style="margin-bottom:0pt; margin-top:0pt"><li style="margin-bottom:0pt; margin-top:0pt"><span style="font-family:'Times New Roman'; font-size:12pt">line1</span></li></ul><p style="margin:0pt 0pt 14pt 36pt; text-indent:-18pt"><span style="font-family:Symbol; font-size:12pt">·</span><span style="font:7.0pt 'Times New Roman'">         </span><span style="font-family:'Times New Roman'; font-size:12pt">line2</span></p></body></html>
Please see the saved file not contained the second <li></li>
pair. Instead it replaced with a ‘.’ character and non-breaking spaces.
here is my code used
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("Aspose.Words.lic");
Document doc = new Document(@"D:\source.htm");
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html);
options.ExportHeadersFootersMode = ExportHeadersFootersMode.None;
doc.Save(@"D:\savedFile.htm", options);
Please help.
Thanks,