Show / Hide Table of Contents

    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.

    Inheritance
    System.Object
    Element
    Namespace: TagSoup
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public class Element : object

    Constructors

    | Improve this Doc View Source

    Element(ElementType, Boolean)

    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

    System.Boolean defaultAttributes

    True if default attributes are wanted

    Properties

    | Improve this Doc View Source

    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
    Attributes
    | Improve this Doc View Source

    Flags

    Gets the flags vector of the element's type.

    Declaration
    public virtual int Flags { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    IsPreclosed

    Return true if this element has been preclosed.

    Declaration
    public virtual bool IsPreclosed { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    LocalName

    Gets the local name of the element's type.

    Declaration
    public virtual string LocalName { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    MemberOf

    Gets the member-of vector of the element's type.

    Declaration
    public virtual int MemberOf { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Model

    Gets the content model vector of the element's type.

    Declaration
    public virtual int Model { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Name

    Gets the name of the element's type.

    Declaration
    public virtual string Name { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Namespace

    Gets the namespace name of the element's type.

    Declaration
    public virtual string Namespace { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    Parent

    Gets the parent element type of the element's type.

    Declaration
    public virtual ElementType Parent { get; }
    Property Value
    Type Description
    ElementType
    | Improve this Doc View Source

    Type

    Gets the element type.

    Declaration
    public virtual ElementType Type { get; }
    Property Value
    Type Description
    ElementType

    Methods

    | Improve this Doc View Source

    Anonymize()

    Make this element anonymous. Remove any id or name attribute present in the element's attributes.

    Declaration
    public virtual void Anonymize()
    | Improve this Doc View Source

    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
    System.Boolean
    | Improve this Doc View Source

    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()
    | Improve this Doc View Source

    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()
    | Improve this Doc View Source

    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
    System.String name

    The attribute name (Qname)

    System.String type

    The attribute type

    System.String value

    The attribute value

    See Also

    ElementType
    Attributes
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)