C# language compare
<p>i wan to compare two xml file and find their differences and similarities,</p>

<pre><code>private void checkLanguage(string file1, string file2)
        {
            XmlDocument xmldoc1 = new XmlDocument();
            XmlDocument xmldoc2 = new XmlDocument();

            XmlNodeList xmlnode1;
            XmlNodeList xmlnode2;
            int i = 0;
            int j = 0;

            string str = null;
            FileStream fs1 = new FileStream(file1, FileMode.Open, FileAccess.Read);
            xmldoc1.Load(fs1);

            FileStream fs2 = new FileStream(file2, FileMode.Open, FileAccess.Read);
            xmldoc2.Load(fs2);

            xmlnode1 = xmldoc1.GetElementsByTagName("data");
            xmlnode2 = xmldoc2.GetElementsByTagName("data");

            for (i = 0; i &lt;= xmlnode1.Count - 1; i++)
            {
                str = xmlnode1[i].Attributes["name"].Value;

                for (j = 0; j &lt;= xmlnode2.Count - 1; j++)
                {
                    if (str == xmlnode2[j].Attributes["name"].Value)
                    {
                        lblResult.ForeColor = Color.Green;
                        lblResult.Text += Environment.NewLine + xmlnode1[i].Attributes["name"].Value;   
                    }

                    else
                    {
                        label4.ForeColor = Color.Red;
                        label4.Text += Environment.NewLine + xmlnode1[i].Attributes["name"].Value;
                    }
                }


            }
}
</code></pre>

<p>my problem is the similar languange in both xml file list out in the difference field also..how to solve this..</p>

<p>can someone help me? thanks</p>
