Compartir a través de


IXmlPullParser.SetInput Method

Definition

Overloads

SetInput(Reader)

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

SetInput(Stream, String)

Sets the input stream the parser is going to process.

SetInput(Reader)

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

[Android.Runtime.Register("setInput", "(Ljava/io/Reader;)V", "GetSetInput_Ljava_io_Reader_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetInput (Java.IO.Reader? in);
[<Android.Runtime.Register("setInput", "(Ljava/io/Reader;)V", "GetSetInput_Ljava_io_Reader_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetInput : Java.IO.Reader -> unit

Parameters

in
Reader
Attributes

Exceptions

Remarks

Set the input source for parser to the given reader and resets the parser. The event type is set to the initial value START_DOCUMENT. Setting the reader to null will just stop parsing and reset parser state, allowing the parser to free internal resources such as parsing buffers.

Java documentation for org.xmlpull.v1.XmlPullParser.setInput(java.io.Reader).

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.

Applies to

SetInput(Stream, String)

Sets the input stream the parser is going to process.

[Android.Runtime.Register("setInput", "(Ljava/io/InputStream;Ljava/lang/String;)V", "GetSetInput_Ljava_io_InputStream_Ljava_lang_String_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetInput (System.IO.Stream? inputStream, string? inputEncoding);
[<Android.Runtime.Register("setInput", "(Ljava/io/InputStream;Ljava/lang/String;)V", "GetSetInput_Ljava_io_InputStream_Ljava_lang_String_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetInput : System.IO.Stream * string -> unit

Parameters

inputStream
Stream

contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null).

inputEncoding
String

if not null it MUST be used as encoding for inputStream

Attributes

Exceptions

Remarks

Sets the input stream the parser is going to process. This call resets the parser state and sets the event type to the initial value START_DOCUMENT.

<strong>NOTE:</strong> If an input encoding string is passed, it MUST be used. Otherwise, if inputEncoding is null, the parser SHOULD try to determine input encoding following XML 1.0 specification (see below). If encoding detection is supported then following feature http://xmlpull.org/v1/doc/features.html#detect-encoding MUST be true and otherwise it must be false.

Java documentation for org.xmlpull.v1.XmlPullParser.setInput(java.io.InputStream, java.lang.String).

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.

Applies to