Class HtmlParser
Parses any html into a valid xhtml document.
Inheritance
System.Object
    HtmlParser
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
  Namespace: EPiServer.Core.Html
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class HtmlParser
  Remarks
Results either in pure text or XmlDocument
Constructors
HtmlParser(String)
Parses a string containing Html and converts it to Xhtml that can be returned as a string or a XmlDocument.
Declaration
public HtmlParser(string htmlToIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | htmlToIndex | The Html that will be parsed.  | 
      
HtmlParser(String, Boolean)
Parses a string containing Html and converts it to Xhtml that can be returned as a string or a XmlDocument.
Declaration
public HtmlParser(string htmlToIndex, bool allowScriptTags)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | htmlToIndex | The Html that will be parsed.  | 
      
| System.Boolean | allowScriptTags | if set to   | 
      
Methods
ToString()
Retrive HTML converted to XHTML as a string.
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| System.String | A string containing XHTML  | 
      
Overrides
System.Object.ToString()
  
  
  
  ToXmlDocument()
Retrive HTML converted to XHTML as a XML document.
Declaration
public XmlDocument ToXmlDocument()
  Returns
| Type | Description | 
|---|---|
| System.Xml.XmlDocument | A XML document containing XHTML  |