Condividi tramite


PackageManager.GetXml(String, Int32, ApplicationInfo) Method

Definition

Retrieve an XML file from a package.

[Android.Runtime.Register("getXml", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Landroid/content/res/XmlResourceParser;", "GetGetXml_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")]
public abstract System.Xml.XmlReader? GetXml (string packageName, int resid, Android.Content.PM.ApplicationInfo? appInfo);
[<Android.Runtime.Register("getXml", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Landroid/content/res/XmlResourceParser;", "GetGetXml_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")>]
abstract member GetXml : string * int * Android.Content.PM.ApplicationInfo -> System.Xml.XmlReader

Parameters

packageName
String

The name of the package that this xml is coming from. Cannot be null.

resid
Int32

The resource identifier of the desired xml. Cannot be 0.

appInfo
ApplicationInfo

Overall information about <var>packageName</var>. This may be null, in which case the application information will be retrieved for you if needed; if you already have this information around, it can be much more efficient to supply it here.

Returns

Returns an XmlPullParser allowing you to parse out the XML data. Returns null if the xml resource could not be found for any reason.

Attributes

Remarks

Retrieve an XML file from a package. This is a low-level API used to retrieve XML meta data.

Java documentation for android.content.pm.PackageManager.getXml(java.lang.String, int, android.content.pm.ApplicationInfo).

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