Interface IMarkupFormatter
- Namespace
- AngleSharp
- Assembly
- AngleSharp.dll
Basic interface for HTML node serialization.
public interface IMarkupFormatter
- Extension Methods
Methods
CloseTag(IElement, bool)
Formats closing a tag with the given name.
string CloseTag(IElement element, bool selfClosing)
Parameters
Returns
- string
The formatted closing tag.
Comment(IComment)
Formats the given comment.
string Comment(IComment comment)
Parameters
comment
ICommentThe comment to stringify.
Returns
- string
The formatted comment.
Doctype(IDocumentType)
Formats the given doctype using the name, public and system identifiers.
string Doctype(IDocumentType doctype)
Parameters
doctype
IDocumentTypeThe document type to stringify.
Returns
- string
The formatted doctype.
LiteralText(ICharacterData)
Emits the text literally.
string LiteralText(ICharacterData text)
Parameters
text
ICharacterDataThe text to return.
Returns
- string
The contained text.
OpenTag(IElement, bool)
Formats opening a tag with the given name.
string OpenTag(IElement element, bool selfClosing)
Parameters
Returns
- string
The formatted opening tag.
Processing(IProcessingInstruction)
Formats the given processing instruction using the target and the data.
string Processing(IProcessingInstruction processing)
Parameters
processing
IProcessingInstructionThe processing instruction to stringify.
Returns
- string
The formatted processing instruction.
Text(ICharacterData)
Formats the given text.
string Text(ICharacterData text)
Parameters
text
ICharacterDataThe text to sanitize.
Returns
- string
The formatted text.