Bagikan melalui


Properties.LoadFromXML(Stream) Method

Definition

Loads all of the properties represented by the XML document on the specified input stream into this properties table.

[Android.Runtime.Register("loadFromXML", "(Ljava/io/InputStream;)V", "GetLoadFromXML_Ljava_io_InputStream_Handler")]
public virtual void LoadFromXML (System.IO.Stream? in);
[<Android.Runtime.Register("loadFromXML", "(Ljava/io/InputStream;)V", "GetLoadFromXML_Ljava_io_InputStream_Handler")>]
abstract member LoadFromXML : System.IO.Stream -> unit
override this.LoadFromXML : System.IO.Stream -> unit

Parameters

in
Stream

the input stream from which to read the XML document.

Attributes

Exceptions

in case an error occurs during a read operation.

if the XML data is not a valid properties file.

Remarks

Loads all of the properties represented by the XML document on the specified input stream into this properties table.

The XML document must have the following DOCTYPE declaration:

&lt;!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"&gt;

Furthermore, the document must satisfy the properties DTD described above.

An implementation is required to read XML documents that use the "UTF-8" or "UTF-16" encoding. An implementation may support additional encodings.

The specified stream is closed after this method returns.

Added in 1.5.

Java documentation for java.util.Properties.loadFromXML(java.io.InputStream).

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