Freigeben über


IXMLReader.Parse Method

Definition

Overloads

Parse(InputSource)

Parse an XML document.

Parse(String)

Parse an XML document from a system identifier (URI).

Parse(InputSource)

Parse an XML document.

[Android.Runtime.Register("parse", "(Lorg/xml/sax/InputSource;)V", "GetParse_Lorg_xml_sax_InputSource_Handler:Org.Xml.Sax.IXMLReaderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Parse (Org.Xml.Sax.InputSource? input);
[<Android.Runtime.Register("parse", "(Lorg/xml/sax/InputSource;)V", "GetParse_Lorg_xml_sax_InputSource_Handler:Org.Xml.Sax.IXMLReaderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Parse : Org.Xml.Sax.InputSource -> unit

Parameters

input
InputSource

The input source for the top-level of the XML document.

Attributes

Exceptions

Any SAX exception, possibly wrapping another exception.

An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

Remarks

Parse an XML document.

The application can use this method to instruct the XML reader to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).

Applications may not invoke this method while a parse is in progress (they should create a new XMLReader instead for each nested XML document). Once a parse is complete, an application may reuse the same XMLReader object, possibly with a different input source. Configuration of the XMLReader object (such as handler bindings and values established for feature flags and properties) is unchanged by completion of a parse, unless the definition of that aspect of the configuration explicitly specifies other behavior. (For example, feature flags or properties exposing characteristics of the document being parsed.)

During the parse, the XMLReader will provide information about the XML document through the registered event handlers.

This method is synchronous: it will not return until parsing has ended. If a client application wants to terminate parsing early, it should throw an exception.

Java documentation for org.xml.sax.XMLReader.parse(org.xml.sax.InputSource).

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.

See also

Applies to

Parse(String)

Parse an XML document from a system identifier (URI).

[Android.Runtime.Register("parse", "(Ljava/lang/String;)V", "GetParse_Ljava_lang_String_Handler:Org.Xml.Sax.IXMLReaderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Parse (string? systemId);
[<Android.Runtime.Register("parse", "(Ljava/lang/String;)V", "GetParse_Ljava_lang_String_Handler:Org.Xml.Sax.IXMLReaderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Parse : string -> unit

Parameters

systemId
String

The system identifier (URI).

Attributes

Exceptions

Any SAX exception, possibly wrapping another exception.

An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

Remarks

Parse an XML document from a system identifier (URI).

This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:

parse(new InputSource(systemId));

If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.

Java documentation for org.xml.sax.XMLReader.parse(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.

See also

Applies to