Loading Data from Xml

Apr 28, 2011 at 12:33 PM

i work on win phone 7 app i have a problem on load data from xml file i try this project  :

but i cross a problem on class Database method LoadTable more specific on XmlSerializer 
 please if any body have an idea to resolve this problem 

Apr 29, 2011 at 2:11 AM

I am not sure exactly what you are asking.  Are you getting an error building the project?  If so, could you provide more details?



Apr 29, 2011 at 12:09 PM

Thanks Sergey,

I have an error on building project exactly on the following XmlSerializer constructor :  

 internal void LoadTable(IsolatedStorageFileStream tableStream, Type tableType)
            string content;
            using (StreamReader reader = new StreamReader(tableStream))
                content = reader.ReadToEnd();


            using (StringReader stringReader = new StringReader(content))
                Xmlserializer = new XmlSerializer(typeof(tableType));
                ITable table;
                if (!string.IsNullOrEmpty(content))
                    table = (ITable)serializer.Deserialize(stringReader);
                    table = (ITable)Activator.CreateInstance(tableType);
                table.SetTableDefinition(_databaseName, _password);

                List<ITable> tables = new List<ITable>(_tables);
                var tableToRemove = (from oneTable in tables where oneTable.RowType == table.RowType select oneTable).FirstOrDefault();
                _tables = new ReadOnlyCollection<ITable>(tables);

It gives that XmlSerializer not found or there is a missied assembly refrence  

I already add all the namespaces refrences that it need 

Thanks i appreciate.  


Apr 30, 2011 at 4:05 AM

All I could think is that your references are not working.  Maybe you have incorrect reference or you do not have correct version of phone tools installed?