C# Class Tidy.Core.ParserImpl

HTML Parser implementation (c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.cs for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000
Show file Open project: r1pper/TidyNetPortable

Public Methods

Method Description
IsJavaScript ( Node node ) : bool
ParseDocument ( Lexer lexer ) : Node
ParseXmlDocument ( Lexer lexer ) : Node
ParseXmlElement ( Lexer lexer, Node element, short mode ) : void
XmlPreserveWhiteSpace ( Node element, TagCollection tt ) : bool

Indicates whether or not whitespace should be preserved for this element. If an xml:space attribute is found, then if the attribute value is preserve, returns true. For any other value, returns false. If an xml:space attribute was not found, then the following element names result in a return value of true: pre, script, style, and xsl:text. Finally, if a TagTable was passed in and the element appears as the "pre" element in the TagTable, then true will be returned. Otherwise, false is returned.

Private Methods

Method Description
MoveToHead ( Lexer lexer, Node element, Node node ) : void
ParseTag ( Lexer lexer, Node node, short mode ) : void
ParserImpl ( ) : System
Wsubstr ( string s1, string s2 ) : bool

Method Details

IsJavaScript() public static method

public static IsJavaScript ( Node node ) : bool
node Node
return bool

ParseDocument() public static method

public static ParseDocument ( Lexer lexer ) : Node
lexer Lexer
return Node

ParseXmlDocument() public static method

public static ParseXmlDocument ( Lexer lexer ) : Node
lexer Lexer
return Node

ParseXmlElement() public static method

public static ParseXmlElement ( Lexer lexer, Node element, short mode ) : void
lexer Lexer
element Node
mode short
return void

XmlPreserveWhiteSpace() public static method

Indicates whether or not whitespace should be preserved for this element. If an xml:space attribute is found, then if the attribute value is preserve, returns true. For any other value, returns false. If an xml:space attribute was not found, then the following element names result in a return value of true: pre, script, style, and xsl:text. Finally, if a TagTable was passed in and the element appears as the "pre" element in the TagTable, then true will be returned. Otherwise, false is returned.
public static XmlPreserveWhiteSpace ( Node element, TagCollection tt ) : bool
element Node /// The Node to test to see if whitespace should be /// preserved. ///
tt TagCollection /// The TagTable to test for the getNodePre() /// function. This may be null, in which case this test /// is bypassed. ///
return bool