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 HtmlStreamReader class.
Declaration
public HtmlStreamReader(IHtmlParserContext context)
Parameters
Type | Name | Description |
---|---|---|
IHtmlParserContext | context | The context that this instance of HtmlStreamReader uses to parse HTML. |
HtmlStreamReader(IHtmlSource, ParserOptions)
Initializes a new instance of the HtmlStreamReader class.
Declaration
public HtmlStreamReader(IHtmlSource source, ParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
IHtmlSource | source | The HTML source provider. |
ParserOptions | options | The options that should be enabled when parsing HTML. |
HtmlStreamReader(TextReader)
Initializes a new instance of the HtmlStreamReader class.
Declaration
public HtmlStreamReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | The reader that contains the HTML source. |
HtmlStreamReader(TextReader, ParserOptions)
Initializes a new instance of the HtmlStreamReader class.
Declaration
public HtmlStreamReader(TextReader reader, ParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | The reader that contains the HTML source. |
ParserOptions | options | The options that should be enabled when parsing HTML. |
HtmlStreamReader(String)
Initializes a new instance of the HtmlStreamReader class.
Declaration
public HtmlStreamReader(string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The HTML source. |
HtmlStreamReader(String, ParserOptions)
Initializes a new instance of the HtmlStreamReader class.
Declaration
public HtmlStreamReader(string source, ParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The HTML source. |
ParserOptions | 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 |
---|---|
IHtmlParserContext | The context. |
Methods
GetEnumerator()
Returns an enumerator that iterates through the parsed HTML fragments.
Declaration
public IEnumerator<HtmlFragment> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<HtmlFragment> | A System.Collections.Generic.IEnumerator<> that can be used to iterate through the collection. |