Access content in Windows Store package -
the article 'how load file resources' on msdn , others, discuss ms-appx , ms-appdata uri schemes addressing content in application package.
http://msdn.microsoft.com/en-us/library/windows/apps/hh781229.aspx
the problem is, can't see way load other image files. xmlreader, example, doesn't support these uri schemes , windows.storage.pathio static read methods throw
comexception: "error hresult e_fail has been returned call com component."
possibly exception caused bad uri/usage error. know silverlight used throw message sorts of reasons.
has been able read non-image data package?
luke
i'm able answer own question.
var f = windows.applicationmodel.package.current.installedlocation.getfolderasync("data").astask().result; var = f.getfileasync("sample data.xml").astask().result; var s = windows.storage.fileio.readtextasync(i).astask().result; var r = system.xml.xmlreader.create(new stringreader(s)); r.movetocontent(); var x = r.readinnerxml();
excuse lack of awaits, experimental code.
i filed connect bug xmlreader.create method not accepting package uri - shouldn't hard, , what's point of package uri if nothing uses it.
Comments
Post a Comment