Class HtmlStreamReader
A streaming HTML parser implementation that will enumerate the HTML fragments in the stream.
Inheritance
Namespace: EPiServer.HtmlParsing
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public class HtmlStreamReader : Object, IEnumerable<HtmlFragment>, IEnumerable
Constructors
HtmlStreamReader(IHtmlParserContext)
Initializes a new instance of the Html
Declaration
public HtmlStreamReader(IHtmlParserContext context)
Parameters
Type | Name | Description |
---|---|---|
IHtml |
context | The context that this instance of HtmlStreamReader uses to parse HTML. |
HtmlStreamReader(IHtmlSource, ParserOptions)
Initializes a new instance of the Html
Declaration
public HtmlStreamReader(IHtmlSource source, ParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
IHtml |
source | The HTML source provider. |
Parser |
options | The options that should be enabled when parsing HTML. |
HtmlStreamReader(TextReader)
Initializes a new instance of the Html
Declaration
public HtmlStreamReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System. |
reader | The reader that contains the HTML source. |
HtmlStreamReader(TextReader, ParserOptions)
Initializes a new instance of the Html
Declaration
public HtmlStreamReader(TextReader reader, ParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
reader | The reader that contains the HTML source. |
Parser |
options | The options that should be enabled when parsing HTML. |
HtmlStreamReader(String)
Initializes a new instance of the Html
Declaration
public HtmlStreamReader(string source)
Parameters
Type | Name | Description |
---|---|---|
System. |
source | The HTML source. |
HtmlStreamReader(String, ParserOptions)
Initializes a new instance of the Html
Declaration
public HtmlStreamReader(string source, ParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
source | The HTML source. |
Parser |
options | The options that should be enabled when parsing HTML. |
Properties
Context
Gets or sets the context for the HTML parser.
Declaration
public IHtmlParserContext Context { get; }
Property Value
Type | Description |
---|---|
IHtml |
The context. |
Methods
GetEnumerator()
Returns an enumerator that iterates through the parsed HTML fragments.
Declaration
public IEnumerator<HtmlFragment> GetEnumerator()
Returns
Type | Description |
---|---|
System. |
A System.Collections.Generic.IEnumerator<> that can be used to iterate through the collection. |