Reputation: 130
I'm new to android/xamarin. I have an embedded xml file that I want to read in "Resources\xml\settings.xml" but I can't open it with the XmlDocument();
Can anyone help me correct this code?
XmlDocument doc = new XmlDocument ();
doc.Load ("Resources\xml\settings.xml");
int c = 0;
foreach (XmlNode item in doc.ChildNodes) {
name[c] = item.ChildNodes [0].InnerText;
pref[c] = item.ChildNodes [1].InnerText;
c++;
}
It always gives me an error in the "doc.load(..." line and I've tried everything. (Build action is set to embeddedResource)
Thanks in advance.
Upvotes: 1
Views: 4699