C# Class Microsoft.Html.Core.Parser.HtmlParser

ファイルを表示 Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
HtmlParser ( ) : System

Creates HTML parser with HTML parsing mode.

HtmlParser ( ParsingMode parsingMode ) : System

Creates HTML parser.

HtmlParser ( ParsingMode parsingMode, IHtmlScriptTypeResolutionService scriptTypeResolution, IHtmlScriptOrStyleTagNamesService scriptOrStyleTagNameService ) : System

Creates HTML parser

Parse ( ITextProvider textProvider ) : void

Parse text from a text provider

Parse ( ITextProvider textProvider, ITextRange range ) : void

Parse text from a text provider within a given range

Parse ( string text ) : void

Parse HTML from a string

Private Methods

Method Description
CloseStartTag ( int position, int length, bool selfClose, bool wellFormed ) : void
FindEndOfBlock ( string endTag, bool simpleSearch = false ) : ITextRange
GetAttributeState ( int tagEnd, bool artifactTag, bool getValueInfo ) : AttributeToken
GetAttributeValue ( bool isScript, int tagEnd ) : IHtmlAttributeValueToken
GetAttributeValue ( IHtmlAttributeValueToken valueToken ) : string
OnAttributeState ( bool artifactTag = false ) : AttributeToken
OnAttributeState ( int tagEnd, bool artifactTag = false ) : AttributeToken
OnCommentState ( ) : void
OnEndTagState ( ) : void
OnEntityState ( ) : void
OnScriptState ( string scriptType, NameToken nameToken ) : void
OnStartTagState ( ) : void
OnStyleState ( NameToken nameToken ) : void
OnTextState ( ) : void
UpdateDocType ( ) : void
UpdateParseMode ( DocType docType ) : void

Method Details

HtmlParser() public method

Creates HTML parser with HTML parsing mode.
public HtmlParser ( ) : System
return System

HtmlParser() public method

Creates HTML parser.
public HtmlParser ( ParsingMode parsingMode ) : System
parsingMode ParsingMode /// Parsing mode (HTML, XHTML or XML). HTML and XHTML differ in element /// and attribute name case-sensitity while XML mode treats <script> /// and <style elements as regular elements. ///
return System

HtmlParser() public method

Creates HTML parser
public HtmlParser ( ParsingMode parsingMode, IHtmlScriptTypeResolutionService scriptTypeResolution, IHtmlScriptOrStyleTagNamesService scriptOrStyleTagNameService ) : System
parsingMode ParsingMode /// Parsing mode (HTML, XHTML or XML). HTML and XHTML differ in element /// and attribute name case-sensitity while XML mode treats <script> /// and <style elements as regular elements. ///
scriptTypeResolution IHtmlScriptTypeResolutionService /// A service that helps parser to detemine if content of a <script> /// block should be skipped over (normal behavior) or should parser /// continue parsing inside the block since block content is actually /// a markup, like in <script type="text/x-handlebars-template">. ///
scriptOrStyleTagNameService IHtmlScriptOrStyleTagNamesService
return System

Parse() public method

Parse text from a text provider
public Parse ( ITextProvider textProvider ) : void
textProvider ITextProvider Text provider
return void

Parse() public method

Parse text from a text provider within a given range
public Parse ( ITextProvider textProvider, ITextRange range ) : void
textProvider ITextProvider Text provider
range ITextRange Range to parse
return void

Parse() public method

Parse HTML from a string
public Parse ( string text ) : void
text string String to parse
return void