public MainWindow() { InitializeComponent(); this.DataContext = this; ParseDataXML.AddSchemaValidation(@"..\..\XMLWiki.xsd", XmlReaderSettings_ValidationEventHandler); }
private async Task <Person> LoadRandomPersonAsync() { Person result = null; string responseXML; while (result == null) { responseXML = await WikiConnection.LoadRandomData(); if (responseXML != null) { using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(responseXML))) { result = ParseDataXML.Parse(stream); } } } return(result); }