Resources.GetXml(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return an XmlResourceParser through which you can read a generic XML resource for the given resource ID.
[Android.Runtime.Register("getXml", "(I)Landroid/content/res/XmlResourceParser;", "GetGetXml_IHandler")]
public virtual System.Xml.XmlReader GetXml (int id);
[<Android.Runtime.Register("getXml", "(I)Landroid/content/res/XmlResourceParser;", "GetGetXml_IHandler")>]
abstract member GetXml : int -> System.Xml.XmlReader
override this.GetXml : int -> System.Xml.XmlReader
Parameters
- id
- Int32
The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.
Returns
A new parser object through which you can read the XML data.
- Attributes
Exceptions
Throws NotFoundException if the given ID does not exist.
Remarks
Return an XmlResourceParser through which you can read a generic XML resource for the given resource ID.
The XmlPullParser implementation returned here has some limited functionality. In particular, you can't change its input, and only high-level parsing events are available (since the document was pre-parsed for you at build time, which involved merging text and stripping comments).
Java documentation for android.content.res.Resources.getXml(int)
.
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.