I'm trying to load Raw XML from a file in my projects assets folder using Mono For Android.
When i press the button I get no errors so the file is clearly being found but the contents aren't loading into the text view. Am I missing something or is my code completely wrong?
Here is my code:
var xmlView = FindViewById<TextView> (Resource.Id.xmlView);
Button button = FindViewById<Button> (Resource.Id.loadXml);
button.Click += delegate(object sender, EventArgs e) {
XmlDocument doc = new XmlDocument();
Assets.Open ("XMLFile.xml");
string xmlcontents = doc.InnerXml;
xmlView.Text = "File Loaded!" + xmlcontents;
};