Class Attributes
Default implementation of the Attributes interface.
Inheritance
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class Attributes : object, IAttributes
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.
This class provides a default implementation of the SAX2 Attributes interface, with the addition of manipulators so that the list can be modified or reused.
There are two typical uses of this class:
- to take a persistent snapshot of an Attributes object in a StartElement(String, String, String, IAttributes) event; or
- to construct or modify an Attributes object in a SAX2 driver or filter.
This class replaces the now-deprecated SAX1 AttributeListImpl class; in addition to supporting the updated Attributes interface rather than the deprecated IAttributeList interface, it also includes a much more efficient implementation using a single array rather than a set of Vectors.
Constructors
Name | Description |
---|---|
Attributes() | Construct a new, empty Attributes object. |
Attributes(IAttributes) | Copy an existing Attributes object. This constructor is especially useful inside a StartElement(String, String, String, IAttributes). |
Properties
Name | Description |
---|---|
Length | Return the number of attributes in the list. |
Methods
Name | Description |
---|---|
AddAttribute(String, String, String, String, String) | Add an attribute to the end of the list. For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application. |
Clear() | Clear the attribute list for reuse. Note that little memory is freed by this call: the current array is kept so it can be reused. |
GetIndex(String) | Look up an attribute's index by qualified (prefixed) name. |
GetIndex(String, String) | Look up an attribute's index by Namespace name. |
GetLocalName(Int32) | Return an attribute's local name. |
GetQName(Int32) | Return an attribute's qualified (prefixed) name. |
GetType(Int32) | Return an attribute's type by index. |
GetType(String) | Look up an attribute's type by qualified (prefixed) name. |
GetType(String, String) | Look up an attribute's type by Namespace-qualified name. |
GetURI(Int32) | Return an attribute's Namespace URI. |
GetValue(Int32) | Return an attribute's value by index. |
GetValue(String) | Look up an attribute's value by qualified (prefixed) name. |
GetValue(String, String) | Look up an attribute's value by Namespace-qualified name. |
RemoveAttribute(Int32) | Remove an attribute from the list. |
SetAttribute(Int32, String, String, String, String, String) | Set an attribute in the list. For the sake of speed, this method does no checking for name conflicts or well-formedness: such checks are the responsibility of the application. |
SetAttributes(IAttributes) | Copy an entire Attributes object. It may be more efficient to reuse an existing object rather than constantly allocating new ones. |
SetLocalName(Int32, String) | Set the local name of a specific attribute. |
SetQName(Int32, String) | Set the qualified name of a specific attribute. |
SetType(Int32, String) | Set the type of a specific attribute. |
SetURI(Int32, String) | Set the Namespace URI of a specific attribute. |
SetValue(Int32, String) | Set the value of a specific attribute. |