Windows8 载入XML文件

public async Task LoadXmlFile(String folder, String file)
        {
            StorageFolder storageFolder = await Package.Current.InstalledLocation.GetFolderAsync(folder);
            StorageFile storageFile = await storageFolder.GetFileAsync(file);

            XmlLoadSettings loadSettings = new XmlLoadSettings();
            loadSettings.ProhibitDtd = false;
            loadSettings.ResolveExternals = false;
            return await XmlDocument.LoadFromFileAsync(storageFile, loadSettings);
        }

 

posted on 2013-03-27 11:44  JackSlaterYu  阅读(185)  评论(0编辑  收藏  举报