compare xml with data in database

I need advice on how to compare xml files with the data stored in the database. I have the following piece of code ...namespace NacitanieXML{ public partial class Form1 : Form { public Form1() { InitializeComponent(); }\[code\] List<string[]> konecneHodnoty = new List<string[]>(); private void button1_Click(object sender, EventArgs e) { XmlNodeType type; string[] pieces; string[] riadky; using(XmlTextReader reader = new XmlTextReader("gps.kml")) { foreach (string[] pom in konecneHodnoty) { string prvaHodnota = pom[0]; } while (reader.Read()) { type = reader.NodeType; if (type == XmlNodeType.Element) { if (reader.Name == "coordinates") { reader.Read(); string pozicie = reader.Value; riadky = pozicie.Split(new string[] { "\r\n" }, StringSplitOptions.None); foreach (string riadok in riadky) { if (riadok != String.Empty) { pieces = riadok.Split(new string[] { "," }, StringSplitOptions.None); konecneHodnoty.Add(pieces); } } } } } reader.Close(); } }}\[/code\]}Each line of the XML document has three parts now, and I need to compare the first and second value of data in the database.I have a table in the database - Tab_Position - and her columns lat and lon. I think I need a loop to navigate database data, or somehow through select?MessageBox is open for identity data.Thanks :)
 
Top