November Happy Hour will be moved to Thursday December 5th.

Interface IFragmentCreator

Interface defining the basic handler for HTML fragment creation.

Namespace: EPiServer.HtmlParsing
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public interface IFragmentCreator

Methods

CreateHtmlFragment(HtmlFragmentType)

Factory method for creating the specified HTML fragment type.

Declaration
HtmlFragment CreateHtmlFragment(HtmlFragmentType fragmentType)
Parameters
Type Name Description
HtmlFragmentType fragmentType

Type of the fragment.

Returns
Type Description
HtmlFragment

A HTML fragment that can be used to hold information about the indicated fragment type.

CreateHtmlFragmentFromStream(IHtmlSource)

Creates a HTML fragment from stream.

Declaration
HtmlFragment CreateHtmlFragmentFromStream(IHtmlSource source)
Parameters
Type Name Description
IHtmlSource source

The source for the HTML stream.

Returns
Type Description
HtmlFragment

A HTML fragment that can be used to hold information about the indicated fragment type.

Remarks

This method will scan for and create any HTML fragment type except TextFragment. I e this method should be called after a '<' has been detected in the HTML source.

To fully populate the returned HtmlFragment yuo should call the Parse method on the returned object.

Extension Methods