UL bottom margin with InsertHtml

Hi,
I cannot seem to figure out how to control the bottom margin of UL when html is inserted with builder.InsertHtml().
For example, when I use the following line, there will be a margin between BBB and CCC. How can I control the margin height?

builder.InsertHtml("<ul><li>AAA</li><li>BBB</li></ul><ul><li>CCC</li><li>DDD</li><ul>");

Thanks.

Hi

Thanks for your inquiry. As I can see, Aspose.Words inserted these two lists properly, exactly as IE displays them. If you would like to remove this spacing between lists, you can try resetting “Spacing After” of paragraphs, which are list items. Please let me know if you need more assistance, I will be glad to help you.
Best regards.

Hi Alexey,
Thanks for the directions. I’ve got it working with the following code.

builder.InsertHtml("<ul><li>AAA</li><li>BBB</li></ul><ul><li>CCC</li><li>DDD</li><ul>");
NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true); fore
ach(Paragraph paragraph in paragraphs)
{
    if (paragraph.IsListItem)
    {
        paragraph.ParagraphFormat.SpaceAfterAuto = false;
        paragraph.ParagraphFormat.SpaceAfter = 0;
    }
}

Thanks.

Hi

It is perfect that you found a workaround of the problem.
Best regards.