// @nuget: HtmlAgilityPack
using System;
using HtmlAgilityPack;
using System.Collections.Generic;
public class Program
{
public static void Main()
// Load
var html = @"<p><ul><li>test</li></ul></p>";
var doc = new HtmlDocument();
doc.LoadHtml(html);
// ADD code to reproduce the issue here
var documentNodeInnerHtml = doc.DocumentNode.InnerHtml;
// Show info
System.Console.WriteLine(documentNodeInnerHtml);
}