Compartir a través de


IXmlResourceParser Interface

Definition

The XML parsing interface returned for an XML resource.

[Android.Runtime.Register("android/content/res/XmlResourceParser", "", "Android.Content.Res.IXmlResourceParserInvoker")]
public interface IXmlResourceParser : Android.Util.IAttributeSet, IDisposable, Java.Interop.IJavaPeerable, Org.XmlPull.V1.IXmlPullParser
[<Android.Runtime.Register("android/content/res/XmlResourceParser", "", "Android.Content.Res.IXmlResourceParserInvoker")>]
type IXmlResourceParser = interface
    interface IAttributeSet
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IXmlPullParser
Derived
Attributes
Implements

Remarks

The XML parsing interface returned for an XML resource. This is a standard XmlPullParser interface but also extends AttributeSet and adds an additional #close() method for the client to indicate when it is done reading the resource.

Java documentation for android.content.res.XmlResourceParser.

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.

Fields

FeatureProcessDocdecl

This feature determines whether the document declaration is processed.

(Inherited from IXmlPullParser)
FeatureProcessNamespaces

This feature determines whether the parser processes namespaces.

(Inherited from IXmlPullParser)
FeatureReportNamespaceAttributes

This feature determines whether namespace attributes are exposed via the attribute access methods.

(Inherited from IXmlPullParser)
FeatureValidation

If this feature is activated, all validation errors as defined in the XML 1.

(Inherited from IXmlPullParser)
NoNamespace

This constant represents the default namespace (empty string "")

(Inherited from IXmlPullParser)

Properties

AttributeCount
ClassAttribute

Return the value of the "class" attribute or null if there is not one.

(Inherited from IAttributeSet)
ColumnNumber

Returns the current column number, starting from 0.

(Inherited from IXmlPullParser)
Depth

Returns the current depth of the element.

(Inherited from IXmlPullParser)
EventType

Returns the type of the current event (START_TAG, END_TAG, TEXT, etc.

(Inherited from IXmlPullParser)
Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IdAttribute

Return the value of the "id" attribute or null if there is not one.

(Inherited from IAttributeSet)
InputEncoding

Returns the input encoding if known, null otherwise.

(Inherited from IXmlPullParser)
IsEmptyElementTag

Returns true if the current event is START_TAG and the tag is degenerated (e.g. <foobar/>).

(Inherited from IXmlPullParser)
IsWhitespace

Checks whether the current TEXT event contains only whitespace characters.

(Inherited from IXmlPullParser)
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)
LineNumber

Returns the current line number, starting from 1.

(Inherited from IXmlPullParser)
Name

For START_TAG or END_TAG events, the (local) name of the current element is returned when namespaces are enabled.

(Inherited from IXmlPullParser)
Namespace

Returns the namespace URI of the current element.

(Inherited from IXmlPullParser)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
PositionDescription
Prefix

Returns the prefix of the current element.

(Inherited from IXmlPullParser)
StyleAttribute

Return the value of the "style" attribute or 0 if there is not one.

(Inherited from IAttributeSet)
Text

Returns the text content of the current event as String.

(Inherited from IXmlPullParser)

Methods

Close()

Close this parser.

DefineEntityReplacementText(String, String)

Set new value for entity replacement text as defined in XML 1.0 Section 4.5 Construction of Internal Entity Replacement Text.

(Inherited from IXmlPullParser)
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)
GetAttributeBooleanValue(Int32, Boolean)

Return the boolean value of attribute at 'index'.

(Inherited from IAttributeSet)
GetAttributeBooleanValue(String, String, Boolean)

Return the boolean value of 'attribute'.

(Inherited from IAttributeSet)
GetAttributeFloatValue(Int32, Single)

Return the float value of attribute at 'index'.

(Inherited from IAttributeSet)
GetAttributeFloatValue(String, String, Single)

Return the float value of 'attribute'.

(Inherited from IAttributeSet)
GetAttributeIntValue(Int32, Int32)

Return the integer value of attribute at 'index'.

(Inherited from IAttributeSet)
GetAttributeIntValue(String, String, Int32)

Return the integer value of 'attribute'.

(Inherited from IAttributeSet)
GetAttributeListValue(Int32, String[], Int32)

Return the index of the value of attribute at 'index' in the list 'options'.

(Inherited from IAttributeSet)
GetAttributeListValue(String, String, String[], Int32)

Return the index of the value of 'attribute' in the list 'options'.

(Inherited from IAttributeSet)
GetAttributeName(Int32)
GetAttributeNameResource(Int32)

Return the resource ID associated with the given attribute name.

(Inherited from IAttributeSet)
GetAttributeNamespace(Int32)
GetAttributePrefix(Int32)

Returns the prefix of the specified attribute Returns null if the element has no prefix.

(Inherited from IXmlPullParser)
GetAttributeResourceValue(Int32, Int32)

Return the value of attribute at 'index' as a resource identifier.

(Inherited from IAttributeSet)
GetAttributeResourceValue(String, String, Int32)

Return the value of 'attribute' as a resource identifier.

(Inherited from IAttributeSet)
GetAttributeType(Int32)

Returns the type of the specified attribute If parser is non-validating it MUST return CDATA.

(Inherited from IXmlPullParser)
GetAttributeUnsignedIntValue(Int32, Int32)

Return the integer value of attribute at 'index' that is formatted as an unsigned value.

(Inherited from IAttributeSet)
GetAttributeUnsignedIntValue(String, String, Int32)

Return the boolean value of 'attribute' that is formatted as an unsigned value.

(Inherited from IAttributeSet)
GetAttributeValue(Int32)
GetAttributeValue(String, String)
GetFeature(String)

Returns the current value of the given feature.

(Inherited from IXmlPullParser)
GetIdAttributeResourceValue(Int32)

Return the integer value of the "id" attribute or defaultValue if there is none.

(Inherited from IAttributeSet)
GetNamespace(String)

Returns the URI corresponding to the given prefix, depending on current state of the parser.

(Inherited from IXmlPullParser)
GetNamespaceCount(Int32)

Returns the numbers of elements in the namespace stack for the given depth.

(Inherited from IXmlPullParser)
GetNamespacePrefix(Int32)

Returns the namespace prefix for the given position in the namespace stack.

(Inherited from IXmlPullParser)
GetNamespaceUri(Int32)

Returns the namespace URI for the given position in the namespace stack If the position is out of range, an exception is thrown.

(Inherited from IXmlPullParser)
GetProperty(String)

Look up the value of a property.

(Inherited from IXmlPullParser)
GetTextCharacters(Int32[])

Returns the buffer that contains the text of the current event, as well as the start offset and length relevant for the current event.

(Inherited from IXmlPullParser)
IsAttributeDefault(Int32)

Returns if the specified attribute was not in input was declared in XML.

(Inherited from IXmlPullParser)
Next()

Get next parsing event - element content will be coalesced and only one TEXT event must be returned for whole element content (comments and processing instructions will be ignored and entity references must be expanded or exception must be thrown if entity reference can not be expanded).

(Inherited from IXmlPullParser)
NextTag()

Call next() and return event if it is START_TAG or END_TAG otherwise throw an exception.

(Inherited from IXmlPullParser)
NextText()

If current event is START_TAG then if next element is TEXT then element content is returned or if next event is END_TAG then empty string is returned, otherwise exception is thrown.

(Inherited from IXmlPullParser)
NextToken()

This method works similarly to next() but will expose additional event types (COMMENT, CDSECT, DOCDECL, ENTITY_REF, PROCESSING_INSTRUCTION, or IGNORABLE_WHITESPACE) if they are available in input.

(Inherited from IXmlPullParser)
Require(XmlPullParserNode, String, String)

Test if the current event is of the given type and if the namespace and name do match.

(Inherited from IXmlPullParser)
SetFeature(String, Boolean)

Use this call to change the general behaviour of the parser, such as namespace processing or doctype declaration handling.

(Inherited from IXmlPullParser)
SetInput(Reader)

Set the input source for parser to the given reader and resets the parser.

(Inherited from IXmlPullParser)
SetInput(Stream, String)

Sets the input stream the parser is going to process.

(Inherited from IXmlPullParser)
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)
SetProperty(String, Object)

Set the value of a property.

(Inherited from IXmlPullParser)
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)
NextAsync(IXmlPullParser)
NextTagAsync(IXmlPullParser)
NextTextAsync(IXmlPullParser)
NextTokenAsync(IXmlPullParser)

Applies to