/// <summary> Creates an empty DOM Document.</summary> internal static IDocument CreateEmptyDocument() { Node document = new Node(Node.RootNode, new byte[0], 0, 0); Node node = new Node(Node.StartTag, new byte[0], 0, 0, "html", new TagTable()); if (document != null && node != null) { Node.InsertNodeAtStart(document, node); return((IDocument)document.Adapter); } else { return(null); } }