IOS Xamarin can't read XML File -


so i've search everywhere. xamarin docs, goggle, here, w3. need store small data in xml file. created xml, got code lined , when go build it. ios.....can't find file.

i've googled answer countless times, , same thing, make sure set content or make sure "embedded resource" i've tried both ways, can't find file access it. ios stupid? no issues in android, took 30 secs. add assets , boom there is. how ios recognize xml file(find it)?

the code xdocuent doc = new xdocument.load("storedlogs.xml") <that line it throws error, through break points is.

after steps through loop bind data in xml object logs a.id = x.element("id).value......
a.name......... , want basic offline storage.

ios stupid?

yes :p

when add xml file embeddedresource, need read assembly instead of path

for example:

var readme = typeof(namespace.app).gettypeinfo().assembly              .getmanifestresourcestrean("resourcename.xml"); using (var sr = new streamreader(readme)) {    //read stream } 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -