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

c# SetCompatibleTextRenderingDefault must be called before the first -

How to prevent logback from emitting repeated "Empty watch file list. Disabling" messages -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -