{"id":67,"date":"2009-05-25T14:06:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=67"},"modified":"2009-05-25T14:06:00","modified_gmt":"1970-01-01T00:00:00","slug":"asp-net-xml-parse-ve-gridview-kontrolunde-gosterim","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/05\/25\/asp-net-xml-parse-ve-gridview-kontrolunde-gosterim\/","title":{"rendered":"Asp.Net Xml Parse Ve Gridview Kontrol\u00fcnde G\u00f6sterim"},"content":{"rendered":"<p><span style=\"font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Selamlar, bu makalemizde xml bir dosyadan veri okutup bu verileri gridview &uuml;zerinde g&ouml;sterecegiz.<\/span><\/p>\n<p><span style=\"font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Bunun i&ccedil;in ilk yapmaniz gereken projenize parse etmek istediginiz xml dosyanizi eklemenizdir daha sonra bir dataset olusturup datasetin ReadXml metoduyla xml dosya parse edilip gridviewin datasource ine ekleniyor.<\/span><\/p>\n<p><strong style=\"\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;<\/span>Xml dosyasi:<\/span><\/strong><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"background: rgb(217, 217, 217) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"614\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 460.6pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&lt;?<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">xml<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"> <\/span><span style=\"font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;\">version<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">=<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&quot;<span style=\"color: blue;\">1.0<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">encoding<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">utf-8<\/span>&quot;<span style=\"color: blue;\"> ?&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">kisilistesi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&gt;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp; <\/span>&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">kisi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"> <\/span><span style=\"font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;\">adi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">=<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&quot;<span style=\"color: blue;\">murat<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">no<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">1<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">kadro<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">muhendis<\/span>&quot;<span style=\"color: blue;\">&gt;&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">kisi<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp; <\/span>&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">kisi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"> <\/span><span style=\"font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;\">adi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">=<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&quot;<span style=\"color: blue;\">sabri<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">no<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">2<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">kadro<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">muhendis<\/span>&quot;<span style=\"color: blue;\">&gt;&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">kisi<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp; <\/span>&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">kisi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\"> <\/span><span style=\"font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;\">adi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">=<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&quot;<span style=\"color: blue;\">tonymontana<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">no<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">3<\/span>&quot;<span style=\"color: blue;\"> <\/span><span style=\"color: red;\">kadro<\/span><span style=\"color: blue;\">=<\/span>&quot;<span style=\"color: blue;\">mudur<\/span>&quot;<span style=\"color: blue;\">&gt;&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">kisi<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&lt;\/<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">kisilistesi<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&gt;<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p><strong style=\"\"><span style=\"font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Kod olarak ise <\/span><\/strong><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"background: rgb(217, 217, 217) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"614\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 460.6pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: rgb(43, 145, 175); font-family: &quot;Courier New&quot;;\">DataSet<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> dset = <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">DataSet<\/span>();<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">dset.ReadXml(Server.MapPath(<span style=\"color: rgb(163, 21, 21);\">&quot;XMLFile.xml&quot;<\/span>)); <span style=\"color: green;\">\/\/xml dosyanin yeri<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">xmlgridview.Visible = <span style=\"color: blue;\">true<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">xmlgridview.DataSource = dset.Tables[0];<\/span><\/p>\n            <p><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">xmlgridview.DataBind();<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p><span style=\"font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">xmlgridview gridviewimizin ismidir.<\/span><\/p>\n<p><span style=\"font-size: 10pt; color: black; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Herkese iyi &ccedil;alismalar&#8230;<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Bir xml dosyasinin parse edilip elementlerinin gridview de g&#246;sterilmesi<\/p>\n","protected":false},"author":522,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[407],"tags":[4273,5241,5020,4502],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/67"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/522"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}