Table of Contents

Class HtmlAttribute

Namespace
HtmlAgilityPack
Assembly
HtmlAgilityPack.dll

Represents an HTML attribute.

public class HtmlAttribute : IComparable
Inheritance
HtmlAttribute
Implements
Inherited Members

Properties

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

Value

Gets or sets the value of the attribute.

public string Value { get; set; }

Property Value

string

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()