private void AddComment(string comment)
{
OpenPendingInlineElements();
InvariantAssert(_openedElements.Count > 0, "AddComment: Stack of opened elements cannot be empty, as we have at least one artificial root element");
XmlElement htmlParent = _openedElements.Peek();
XmlComment xmlComment = _document.CreateComment(comment);
htmlParent.AppendChild(xmlComment);
}