Class Element
The internal representation of an actual element (not an element type). An Element has an element type, attributes, and a successor Element for use in constructing stacks and queues of Elements.
Inherited Members
Namespace: TagSoup
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class Element
Constructors
Element(ElementType, bool)
Return an Element from a specified ElementType.
Declaration
public Element(ElementType type, bool defaultAttributes)
Parameters
Type | Name | Description |
---|---|---|
ElementType | type | The element type of the newly constructed element |
bool | defaultAttributes | True if default attributes are wanted |
See Also
Properties
Attributes
Gets the attributes as an Attributes object. Returning an Attributes makes the attributes mutable.
Declaration
public virtual Attributes Attributes { get; }
Property Value
Type | Description |
---|---|
Attributes |
See Also
Flags
Gets the flags vector of the element's type.
Declaration
public virtual int Flags { get; }
Property Value
Type | Description |
---|---|
int |
See Also
IsPreclosed
Return true if this element has been preclosed.
Declaration
public virtual bool IsPreclosed { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
LocalName
Gets the local name of the element's type.
Declaration
public virtual string LocalName { get; }
Property Value
Type | Description |
---|---|
string |
See Also
MemberOf
Gets the member-of vector of the element's type.
Declaration
public virtual int MemberOf { get; }
Property Value
Type | Description |
---|---|
int |
See Also
Model
Gets the content model vector of the element's type.
Declaration
public virtual int Model { get; }
Property Value
Type | Description |
---|---|
int |
See Also
Name
Gets the name of the element's type.
Declaration
public virtual string Name { get; }
Property Value
Type | Description |
---|---|
string |
See Also
Namespace
Gets the namespace name of the element's type.
Declaration
public virtual string Namespace { get; }
Property Value
Type | Description |
---|---|
string |
See Also
Next
Gets or sets the next element in an element stack or queue.
Declaration
public virtual Element Next { get; set; }
Property Value
Type | Description |
---|---|
Element |
See Also
Parent
Gets the parent element type of the element's type.
Declaration
public virtual ElementType Parent { get; }
Property Value
Type | Description |
---|---|
ElementType |
See Also
Type
Gets the element type.
Declaration
public virtual ElementType Type { get; }
Property Value
Type | Description |
---|---|
ElementType |
See Also
Methods
Anonymize()
Make this element anonymous.
Remove any id
or name
attribute present
in the element's attributes.
Declaration
public virtual void Anonymize()
See Also
CanContain(Element)
Return true if the type of this element can contain the type of another element. Convenience method.
Declaration
public virtual bool CanContain(Element other)
Parameters
Type | Name | Description |
---|---|---|
Element | other | The other element |
Returns
Type | Description |
---|---|
bool |
See Also
Clean()
Clean the attributes of this element. Attributes with null name (the name was ill-formed) or null value (the attribute was present in the element type but not in this actual element) are removed.
Declaration
public virtual void Clean()
See Also
Preclose()
Force this element to preclosed status, meaning that an end-tag has been seen but the element cannot yet be closed for structural reasons.
Declaration
public virtual void Preclose()
See Also
SetAttribute(string, string, string)
Set an attribute and its value into this element.
Declaration
public virtual void SetAttribute(string name, string type, string value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The attribute name (Qname) |
string | type | The attribute type |
string | value | The attribute value |