C# Class XWiki.Html.HtmlUtil

Provides functionalities for cleaning and repairing html code.
Mostra file Open project: xwiki-contrib/xwiki-office Class Usage Examples

Public Methods

Method Description
HtmlToXhtml ( String htmlSource ) : String

Cleans a given html code.

IndentContent ( String htmlSource ) : String

Indents the given html source.

RemoveSpecificTagContent ( String content, String tagBegining, String tagEnding ) : String

Removes a char sequence that starts and ends with the given valaues.

ReplaceBody ( String initialContent, String newBodyTag ) : String

Replaces the body tag with a new given one.

WordHtmlToXhtml ( String htmlSource ) : String

Cleans a Word html source.

Method Details

HtmlToXhtml() public method

Cleans a given html code.
public HtmlToXhtml ( String htmlSource ) : String
htmlSource String The html code.
return String

IndentContent() public method

Indents the given html source.
public IndentContent ( String htmlSource ) : String
htmlSource String The html source.
return String

RemoveSpecificTagContent() public method

Removes a char sequence that starts and ends with the given valaues.
public RemoveSpecificTagContent ( String content, String tagBegining, String tagEnding ) : String
content String The initial content.
tagBegining String The begining of the char sequence.
tagEnding String The end of the char sequence.
return String

ReplaceBody() public method

Replaces the body tag with a new given one.
public ReplaceBody ( String initialContent, String newBodyTag ) : String
initialContent String The initial html code.
newBodyTag String The new body tag.
return String

WordHtmlToXhtml() public method

Cleans a Word html source.
public WordHtmlToXhtml ( String htmlSource ) : String
htmlSource String The initila html source.
return String