Class
ParsedElement

Class that represents a markup element that is being parsed. This is the intermediate state between raw text of the mark-up and the fully parsed, strongly typed Element object that represents it

Definition

Namespace:ArtOfTest.Common

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public sealed class ParsedElement

Inheritance: objectParsedElement

Constructors

ParsedElement(ParsedElementType, string, bool)

Create a new ParsedElement object.

Declaration

cs-api-definition
public ParsedElement(ParsedElementType elementType, string content, bool validateIllegal)

Parameters

elementType

ParsedElementType

The type of element to create.

content

string

The raw content for the element.

validateIllegal

bool

Whether to validate for illegal formats.

ParsedElement(ParsedElementType, string, string, string)

Create a new ParsedElement object.

Declaration

cs-api-definition
public ParsedElement(ParsedElementType elementType, string content, string tagName, string remainder)

Parameters

elementType

ParsedElementType

The type of element to create.

content

string

The raw content for the element.

tagName

string

The tag name of the element.

remainder

string

The rest of the tag text except for the tag name.

Properties

AbsoluteTagIndex

Gets the absolute tag index on the page. (Only Open/valid tags are counted, no comments)

Declaration

cs-api-definition
public int AbsoluteTagIndex { get; }

Property Value

int

Attributes

Gets the parsed attributes of the element.

Declaration

cs-api-definition
public NameValueCollection Attributes { get; }

Property Value

NameValueCollection

IsBeginTag

Gets whether the element is a begin tag or not.

Declaration

cs-api-definition
public bool IsBeginTag { get; }

Property Value

bool

IsEndTag

Gets whether the element is an end tag or not.

Declaration

cs-api-definition
public bool IsEndTag { get; }

Property Value

bool

IsSelfClosing

Gets whether the element is a self closing tag (i.e. <font ... /> )

Declaration

cs-api-definition
public bool IsSelfClosing { get; }

Property Value

bool

ParsingType

Gets the parsed element type.

Declaration

cs-api-definition
public ParsedElementType ParsingType { get; }

Property Value

ParsedElementType

Tag

A tag associated with this element

Declaration

cs-api-definition
public object Tag { get; set; }

Property Value

object

TagName

Gets the tagName of the element.

Declaration

cs-api-definition
public string TagName { get; }

Property Value

string

TagNameIndex

Gets the TagName index within the page. (Only valid tags are counted, no comments)

Declaration

cs-api-definition
public int TagNameIndex { get; }

Property Value

int

Methods

ToString()

The string representation of this element.

Declaration

cs-api-definition
public override string ToString()

Returns

string

The string representation.

Overrides object.ToString()