Class AttributeFragment

An attribute in a HTML element

Inheritance
System.Object
AttributeFragment
Namespace: EPiServer.HtmlParsing
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public class AttributeFragment : TokenFragmentBase<AttributeToken>

Constructors

AttributeFragment()

Initializes a new instance of the AttributeFragment class.

Declaration
public AttributeFragment()

Properties

QuoteChar

Gets or sets the quote character for the Value.

Declaration
public char QuoteChar { get; set; }
Property Value
Type Description
System.Char

The quote char.

Remarks

Both single quote (') and double quote (") are considered as valid quote characters.

UnquotedValue

Gets or sets the unquoted value of the attribute.

Declaration
public string UnquotedValue { get; set; }
Property Value
Type Description
System.String

The unquoted value.

Remarks

Both single quote (') and double quote (") are considered as valid quote characters.

Value

Gets or sets the value of the attribute.

Declaration
public override string Value { get; set; }
Property Value
Type Description
System.String

The value.

Overrides
Remarks

Returns the attribute value exactly as it was parsed, with quote characters etc.

Methods

Parse(IHtmlParserContext)

Parses a HTML attribute from the specified context.

Declaration
public override void Parse(IHtmlParserContext context)
Parameters
Type Name Description
IHtmlParserContext context

The context.

Overrides

ToWriter(TextWriter)

Writes the current instance to a TextWriter.

Declaration
public override void ToWriter(TextWriter writer)
Parameters
Type Name Description
System.IO.TextWriter writer

The writer.

Overrides

Extension Methods