{"id":2316,"date":"2013-05-03T17:56:14","date_gmt":"2013-05-03T08:56:14","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=2316"},"modified":"2014-07-11T18:35:20","modified_gmt":"2014-07-11T09:35:20","slug":"xml-attribute-%ec%b6%94%ea%b0%80","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=2316","title":{"rendered":"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)"},"content":{"rendered":"<p><code><br \/>\nXmlDocument doc = new XmlDocument();<br \/>\ndoc.LoadXml(xmlPSW5);<\/code><\/p>\n<p>XmlNodeList node = doc.GetElementsByTagName(&#8220;ETR_INF&#8221;);<br \/>\nfor (int i = 0; i &lt; node.Count; i++)<br \/>\n{<br \/>\n\/\/attribute \ucd94\uac00<br \/>\nXmlAttribute newAttribute = doc.CreateAttribute(&#8220;LocationName&#8221;);<br \/>\nnewAttribute.Value = ARL_COD_Name;<br \/>\nnode.Item(i).SelectSingleNode(&#8220;ARL_COD&#8221;).Attributes.Append(newAttribute);<\/p>\n<p>\/\/Element \ucd94\uac00 \ubc29\ubc95 1<br \/>\nXmlElement newElement = doc.CreateElement(&#8220;DEP_DAT&#8221;);<br \/>\nXmlText newtext = doc.CreateTextNode(FLI_DAT);<br \/>\nnewElement.AppendChild(newtext);<br \/>\nnode.Item(i).AppendChild(newElement);<\/p>\n<p>\/\/Element \ucd94\uac00 \ubc29\ubc95 2<br \/>\nString sGRAND_TOTAL = &#8220;&lt;GRAND_TOTAL&gt;&lt;GRAND_AMT&gt;&#8221; + GRAND_TOTAL + &#8220;&lt;\/GRAND_AMT&gt;&lt;\/GRAND_TOTAL&gt;&#8221;;<\/p>\n<p>XmlDocumentFragment xfrag = doc.CreateDocumentFragment();<br \/>\nxfrag.InnerXml = sGRAND_TOTAL;<br \/>\n\/\/\uc870\uac74 Append<br \/>\nif (node.Item(i).SelectNodes(&#8220;FAR_INF[FAR_BKD_TYP=&#8217;A&#8217;]&#8221;).Count &gt; 0)<br \/>\n{<br \/>\nnode.Item(i).SelectSingleNode(&#8220;FAR_INF[FAR_BKD_TYP=&#8217;A&#8217;]&#8221;).AppendChild(xfrag);<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/ Element \ubcc0\uacbd \ubc29\ubc95<br \/>\n\/\/ Element replace<\/p>\n<p>\/\/Create a new title element.<br \/>\nXmlElement elem = doc.CreateElement(&#8220;COS&#8221;);<br \/>\nelem.InnerText = ResultSeats;<\/p>\n<p>nodelist.Item(i).ReplaceChild(elem, nodelist.Item(i).SelectSingleNode(&#8220;COS&#8221;));<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlPSW5); XmlNodeList node = doc.GetElementsByTagName(&#8220;ETR_INF&#8221;); for (int i = 0; i &lt; node.Count; i++) { \/\/attribute \ucd94\uac00 XmlAttribute newAttribute = <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=2316\" title=\"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-2316","post","type-post","status-publish","format-standard","hentry","category-devc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)  - AuctionPro<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.auctionpro.co.kr\/?p=2316\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)  - AuctionPro\" \/>\n<meta property=\"og:description\" content=\"XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlPSW5); XmlNodeList node = doc.GetElementsByTagName(&#8220;ETR_INF&#8221;); for (int i = 0; i &lt; node.Count; i++) { \/\/attribute \ucd94\uac00 XmlAttribute newAttribute = [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.auctionpro.co.kr\/?p=2316\" \/>\n<meta property=\"og:site_name\" content=\"AuctionPro\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-03T08:56:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-07-11T09:35:20+00:00\" \/>\n<meta name=\"author\" content=\"golgol\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"golgol\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316\"},\"author\":{\"name\":\"golgol\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\"},\"headline\":\"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)\",\"datePublished\":\"2013-05-03T08:56:14+00:00\",\"dateModified\":\"2014-07-11T09:35:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316\"},\"wordCount\":146,\"commentCount\":0,\"articleSection\":[\"[Dev]C#\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316\",\"name\":\"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute) - AuctionPro\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#website\"},\"datePublished\":\"2013-05-03T08:56:14+00:00\",\"dateModified\":\"2014-07-11T09:35:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?p=2316#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#website\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/\",\"name\":\"AuctionPro\",\"description\":\"\uc625\uc158\ud504\ub85c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/#\\\/schema\\\/person\\\/d3dbae599b06cd55f5b14a3e2116f7a2\",\"name\":\"golgol\",\"url\":\"https:\\\/\\\/www.auctionpro.co.kr\\\/?author=6\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)  - AuctionPro","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.auctionpro.co.kr\/?p=2316","og_locale":"ko_KR","og_type":"article","og_title":"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)  - AuctionPro","og_description":"XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlPSW5); XmlNodeList node = doc.GetElementsByTagName(&#8220;ETR_INF&#8221;); for (int i = 0; i &lt; node.Count; i++) { \/\/attribute \ucd94\uac00 XmlAttribute newAttribute = [...]","og_url":"https:\/\/www.auctionpro.co.kr\/?p=2316","og_site_name":"AuctionPro","article_published_time":"2013-05-03T08:56:14+00:00","article_modified_time":"2014-07-11T09:35:20+00:00","author":"golgol","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"golgol","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.auctionpro.co.kr\/?p=2316#article","isPartOf":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2316"},"author":{"name":"golgol","@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2"},"headline":"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)","datePublished":"2013-05-03T08:56:14+00:00","dateModified":"2014-07-11T09:35:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2316"},"wordCount":146,"commentCount":0,"articleSection":["[Dev]C#"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.auctionpro.co.kr\/?p=2316#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.auctionpro.co.kr\/?p=2316","url":"https:\/\/www.auctionpro.co.kr\/?p=2316","name":"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute) - AuctionPro","isPartOf":{"@id":"https:\/\/www.auctionpro.co.kr\/#website"},"datePublished":"2013-05-03T08:56:14+00:00","dateModified":"2014-07-11T09:35:20+00:00","author":{"@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2"},"breadcrumb":{"@id":"https:\/\/www.auctionpro.co.kr\/?p=2316#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.auctionpro.co.kr\/?p=2316"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.auctionpro.co.kr\/?p=2316#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/www.auctionpro.co.kr\/"},{"@type":"ListItem","position":2,"name":"xml Element and Attribute \ucd94\uac00 (Creating New Element and Attribute)"}]},{"@type":"WebSite","@id":"https:\/\/www.auctionpro.co.kr\/#website","url":"https:\/\/www.auctionpro.co.kr\/","name":"AuctionPro","description":"\uc625\uc158\ud504\ub85c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.auctionpro.co.kr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/www.auctionpro.co.kr\/#\/schema\/person\/d3dbae599b06cd55f5b14a3e2116f7a2","name":"golgol","url":"https:\/\/www.auctionpro.co.kr\/?author=6"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2316"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2316\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}