Class HTMLUIParser
This class provides HTML Parser functionality. It makes the HTML well formatted and safe for use as XML document.
Inheritance
System.Object
HTMLUIParser
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.HTMLUI.Base
Assembly: Syncfusion.HTMLUI.Base.dll
Syntax
public class HTMLUIParser
Constructors
HTMLUIParser()
Default constructor.
Declaration
public HTMLUIParser()
Properties
Encoding
Returns the encoding used by this parser.
Declaration
public Encoding Encoding { get; }
Property Value
Type |
---|
System.Text.Encoding |
Methods
ConvertToXHTML(TokenStream)
Converts HTML to XHTML.
Declaration
protected virtual Stream ConvertToXHTML(TokenStream stream)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | stream |
Returns
Type | Description |
---|---|
System.IO.Stream | String of the parsed document. |
ConvertToXML(TokenStream)
Converts HTML document to XHTML document and loads the result into XML document.
Declaration
protected virtual XmlDocument ConvertToXML(TokenStream stream)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | stream | Source of data. |
Returns
Type |
---|
System.Xml.XmlDocument |
ConvertToXML(String)
Overloaded. Converts HTML to XHTML.
Declaration
protected virtual XmlDocument ConvertToXML(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | String of the parsed document. |
Parse(TokenStream)
Main method. Parses, checks and converts HTML document.
Declaration
public virtual XmlDocument Parse(TokenStream tokenStream)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | tokenStream | Object containing data. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | HTML data in xHTML format. |
Parse(Stream)
Overloaded. Converts HTML data in the stream to xHTML format.
Declaration
public virtual XmlDocument Parse(Stream data)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | data | Stream containing HTML data. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | Html in xHTML format. |
ParseString(String)
Builds HTML object tree from the string text.
Declaration
public virtual XmlElement ParseString(string html)
Parameters
Type | Name | Description |
---|---|---|
System.String | html |
Returns
Type | Description |
---|---|
System.Xml.XmlElement | Root element. |