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
Line
Gets the line number of this attribute in the document.
public int Line { get; }
Property Value
LinePosition
Gets the column number of this attribute in the document.
public int LinePosition { get; }
Property Value
Name
Gets the qualified name of the attribute.
public string Name { get; set; }
Property Value
OriginalName
Name of attribute with original case
public string OriginalName { get; }
Property Value
OwnerDocument
Gets the HTML document to which this attribute belongs.
public HtmlDocument OwnerDocument { get; }
Property Value
OwnerNode
Gets the HTML node to which this attribute belongs.
public HtmlNode OwnerNode { get; }
Property Value
QuoteType
Specifies what type of quote the data should be wrapped in
public AttributeValueQuote QuoteType { get; set; }
Property Value
StreamPosition
Gets the stream position of this attribute in the document, relative to the start of the document.
public int StreamPosition { get; }
Property Value
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
ValueLength
Gets the length of the value.
public int ValueLength { get; }
Property Value
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
XPath
Gets a valid XPath string that points to this Attribute
public string XPath { get; }
Property Value
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
objectAn 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()