Class DocumentTypeFragment
A DOCTYPE directive in a HTML stream
Inherited Members
Namespace: EPiServer.HtmlParsing
Assembly: EPiServer.Framework.dll
Version: 10.10.4Syntax
public class DocumentTypeFragment : HtmlFragmentConstructors
DocumentTypeFragment()
Initializes a new instance of the DocumentTypeFragment class.
Declaration
public DocumentTypeFragment()Properties
DocumentTypeName
Gets or sets the name of the DOCTYPE.
Declaration
public string DocumentTypeName { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | The name of the document type. | 
Remarks
Should be "HTML" for almost all cases, otherwise the DOCTYPE directive indicates that it is not actually HTML that we are parsing.
IsHtml
Gets a value indicating whether this instance is a HTML DOCTYPE directive.
Declaration
public bool IsHtml { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
 | 
Name
Gets the name of the fragment which is always DOCTYPE.
Declaration
public override string Name { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | The name. | 
Overrides
Remarks
Attempting to set this property will throw a NotSupportedException.
Public
Gets or sets the value of the PUBLIC attribute.
Declaration
public string Public { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | The public attribute value. | 
PublicDocType
Gets the type of the content as defined by the DOCTYPE directive.
Declaration
public PublicDocumentType PublicDocType { get; }Property Value
| Type | Description | 
|---|---|
| PublicDocumentType | The type of the content. | 
System
Gets or sets the value of the system attribute.
Declaration
public string System { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | The system attribute value. | 
Methods
Parse(IHtmlParserContext)
Parses the fragment from the specified context.
Declaration
public override void Parse(IHtmlParserContext context)Parameters
| Type | Name | Description | 
|---|---|---|
| IHtmlParserContext | context | The context. | 
Overrides
ToWriter(TextWriter)
Writes the fragment to the given TextWriter.
Declaration
public override void ToWriter(TextWriter writer)Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.TextWriter | writer | The writer. | 
