Table of Contents

Class HtmlAttribute

Namespace
HtmlAgilityPack
Assembly
HtmlAgilityPack.dll

Represents an HTML attribute.

public class HtmlAttribute : IComparable
Inheritance
HtmlAttribute
Implements
Inherited Members

Properties

DeEntitizeValue

Gets the DeEntitized value of the attribute.

public string DeEntitizeValue { get; }

Property Value

string

Line

Gets the line number of this attribute in the document.

public int Line { get; }

Property Value

int

LinePosition

Gets the column number of this attribute in the document.

public int LinePosition { get; }

Property Value

int

Name

Gets the qualified name of the attribute.

public string Name { get; set; }

Property Value

string

OriginalName

Name of attribute with original case

public string OriginalName { get; }

Property Value

string

OwnerDocument

Gets the HTML document to which this attribute belongs.

public HtmlDocument OwnerDocument { get; }

Property Value

HtmlDocument

OwnerNode

Gets the HTML node to which this attribute belongs.

public HtmlNode OwnerNode { get; }

Property Value

HtmlNode

QuoteType

Specifies what type of quote the data should be wrapped in

public AttributeValueQuote QuoteType { get; set; }

Property Value

AttributeValueQuote

StreamPosition

Gets the stream position of this attribute in the document, relative to the start of the document.

public int StreamPosition { get; }

Property Value

int

UseOriginalName

Gets or sets a value indicating whether the attribute should use the original name.

public bool UseOriginalName { get; set; }

Property Value

bool

True if the attribute should use the original name, false if not.

Value

Gets or sets the value of the attribute.

public string Value { get; set; }

Property Value

string

ValueLength

Gets the length of the value.

public int ValueLength { get; }

Property Value

int

ValueStartIndex

Gets the stream position of the value of this attribute in the document, relative to the start of the document.

public int ValueStartIndex { get; }

Property Value

int

XPath

Gets a valid XPath string that points to this Attribute

public string XPath { get; }

Property Value

string

Methods

Clone()

Creates a duplicate of this attribute.

public HtmlAttribute Clone()

Returns

HtmlAttribute

The cloned attribute.

CompareTo(object)

Compares the current instance with another attribute. Comparison is based on attributes' name.

public int CompareTo(object obj)

Parameters

obj object

An attribute to compare with this instance.

Returns

int

A 32-bit signed integer that indicates the relative order of the names comparison.

Remove()

Removes this attribute from it's parents collection

public void Remove()