Working with List and sublists

after writing

builder.InsertHtml(lst.SectionDetails != null ? StripHTML.DecodeHTML(lst.SectionDetails) : string.Empty); 

builder.ListFormat.ListLevel becomes null please help me to solve my problem. Please refer, Working with List and sub lists question in Aspose.Words Forums

Hi,

Thanks for your inquiry. Please follow this thread for further proceedings.

Best regards,

Hi
Thanks for your replay
The above problem is solved after I installed the new version of Aspose.Words
I am facing another problem with

builder.InsertHtml(lst.SectionDetails != null ? HttpUtility.HtmlDecode(lst.SectionDetails) : string.Empty);

Here insert html places the data from starting of the left , but I want some tab space(s) before placing the data on word.
After HtmlDecode function calls data is like this

<p>Section1.1</p><p>Roughly half of the 4,011 high-risk <br />Homeland Security watch list are in 10 states: California, Texas, Ohio, <br />Illinois,  <br />New Jersey.<br /><br />Committee investigators have indicated that larger <br />metrw York and <br /> The report <br />notes that <br />in comparison  large quantities of <br />toxic gas into a city."</p>

Hi Aspose Team

I also need same requirement like the above.
Please provide solution as soon as possible.

Thanks in advance

Hi,

Thanks for the additional information. Please see the following code:

string html = @"<p>Section1.1</p><p>Roughly half of the 4,011 high-risk <br />Homeland Security watch list are in 10 states: California, Texas, Ohio, <br />Illinois,  <br />New Jersey.<br /><br />Committee investigators have indicated that larger <br />metrw York and <br /> The report <br />notes that <br />in comparison  large quantities of <br />toxic gas into a city.</p>";

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc); 

builder.ListFormat.List = doc.Lists.Add(ListTemplate.NumberDefault);
builder.InsertHtml(html, true);

builder.ListFormat.ListIndent();
builder.ListFormat.ListLevel.NumberStyle = NumberStyle.Arabic;
builder.ListFormat.ListLevel.NumberFormat = "\x0000.\x0001";
builder.Writeln("Sub Section1.1 ");

builder.ListFormat.ListIndent();
builder.ListFormat.ListLevel.NumberStyle = NumberStyle.Arabic;
builder.ListFormat.ListLevel.NumberFormat = "\x0000.\x0001.\x0002";
builder.Writeln("Sub Section 1.1.1");

builder.ListFormat.ListOutdent();
builder.Writeln("Sub Section 1.2 ");

builder.ListFormat.ListOutdent();
builder.Writeln("Main Section2");

builder.ListFormat.ListIndent();
builder.Writeln("Sub Section2.1");

builder.ListFormat.RemoveNumbers();       

doc.Save(MyDir + @"out.docx");

I hope, this helps.

Best regards,