در این پست قصد دارم با استفاده از کد #C محتوای یک فایل XML را بازیابی کنم: 1. فرض کنید یک فایل XML مثل چیزی که در زیر مشاهده میکنید در مسیر درایو D داریم: 2. از کد زیر برای اینکار استفاده میکنیم: private void openXml() { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load("d:\props.xml"); XmlNodeList nodeList = xmlDoc.DocumentElement.SelectNodes("/palyer"); foreach (XmlNode node in nodeList) { path = node.SelectSingleNode("path").IerText; widh1 = Convert.ToInt16(node.SelectSingleNode("width").IerText); height1 = Convert.ToInt16(node.SelectSingleNode("height").IerText);...
ادامه مطلب