DOMImplementation
Provides a number of methods for performing operations that are independent of any particular instance of the DOM.
using AngleSharp.DOM.Html;
namespace AngleSharp.DOM
{
public class DOMImplementation : IDOMImplementation
{
public DocumentType CreateDocumentType(string qualifiedName, string publicId, string systemId)
{
DocumentType documentType = new DocumentType();
documentType.PublicId = publicId;
documentType.SystemId = systemId;
documentType.NodeName = qualifiedName;
return documentType;
}
public Document CreateDocument(string namespaceURI, string qualifiedName, DocumentType doctype)
{
Document document = null;
document = ((!(Namespaces.Html == namespaceURI)) ? new Document() : new HTMLDocument());
document.AppendChild(doctype);
document.NodeName = (qualifiedName ?? document.NodeName);
return document;
}
public object GetFeature(string feature, string version)
{
return null;
}
public bool HasFeature(string feature, string version)
{
return false;
}
}
}