Hey all, this is my first MonoDroid program and I was wondering how to
properly access a file on my Android mobile device. I have an xml file in
the Resources/xml folder structure and need to open it up for parsing in my
program.

try
{
  System.IO.StreamReader streamReader = new
System.IO.StreamReader("myorders.xml");
  System.Xml.XmlDocument document = new System.Xml.XmlDocument();
  document.Load(streamReader);

foreach (System.Xml.XmlNode currentNode in document.ChildNodes)
{
  Android.Util.Log.Info("Node", currentNode.InnerText);
}
}
catch (Exception exception)
{
  Android.Util.Log.Info("Exception", exception.Message);
}

Now, I think my biggest issue is what to put in the StreamReader path.
"Resources\\xml\\myorders.xml" does not seem to work. I am definitely
missing something in how to access the device file system. Any hints?

Cheers and thanks!
-JP
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to