다음을 통해 공유


IAttributeList Interface

Definition

Caution

This class is obsoleted in this android platform

Interface for an element's attribute specifications.

[Android.Runtime.Register("org/xml/sax/AttributeList", "", "Org.Xml.Sax.IAttributeListInvoker")]
[System.Obsolete("This class is obsoleted in this android platform")]
public interface IAttributeList : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("org/xml/sax/AttributeList", "", "Org.Xml.Sax.IAttributeListInvoker")>]
[<System.Obsolete("This class is obsoleted in this android platform")>]
type IAttributeList = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

Interface for an element's attribute specifications.

<blockquote> <em>This module, both source code and documentation, is in the Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> See http://www.saxproject.org for further information. </blockquote>

This is the original SAX1 interface for reporting an element's attributes. Unlike the new org.xml.sax.Attributes Attributes interface, it does not support Namespace-related information.

When an attribute list is supplied as part of a org.xml.sax.DocumentHandler#startElement startElement event, the list will return valid results only during the scope of the event; once the event handler returns control to the parser, the attribute list is invalid. To save a persistent copy of the attribute list, use the SAX1 org.xml.sax.helpers.AttributeListImpl AttributeListImpl helper class.

An attribute list includes only attributes that have been specified or defaulted: #IMPLIED attributes will not be included.

There are two ways for the SAX application to obtain information from the AttributeList. First, it can iterate through the entire list:

public void startElement (String name, AttributeList atts) {
              for (int i = 0; i < atts.getLength(); i++) {
                String name = atts.getName(i);
                String type = atts.getType(i);
                String value = atts.getValue(i);
                [...]
              }
            }

(Note that the result of getLength() will be zero if there are no attributes.)

As an alternative, the application can request the value or type of specific attributes:

public void startElement (String name, AttributeList atts) {
              String identifier = atts.getValue("id");
              String label = atts.getValue("label");
              [...]
            }

This member is deprecated. This interface has been replaced by the SAX2 org.xml.sax.Attributes Attributes interface, which includes Namespace support.

Added in SAX 1.0.

Java documentation for org.xml.sax.AttributeList.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
Length

Return the number of attributes in this list.

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetName(Int32)
Obsolete.

Return the name of an attribute in this list (by position).

GetType(Int32)
Obsolete.

Return the type of an attribute in the list (by position).

GetType(String)
Obsolete.

Return the type of an attribute in the list (by name).

GetValue(Int32)
Obsolete.

Return the value of an attribute in the list (by position).

GetValue(String)
Obsolete.

Return the value of an attribute in the list (by name).

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to