{"id":9785,"date":"2025-05-25T20:02:30","date_gmt":"2025-05-25T11:02:30","guid":{"rendered":"https:\/\/www.auctionpro.co.kr\/?p=9785"},"modified":"2026-06-11T13:40:10","modified_gmt":"2026-06-11T04:40:10","slug":"c-xml-data-%ec%b6%94%ec%b6%9c","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=9785","title":{"rendered":"C# XML Data \ucd94\ucd9c"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">C#\uc5d0\uc11c <code>&lt;![CDATA[ ... ]]><\/code> \uc548\uc758 \ub0b4\uc6a9\uc744 \ucd94\ucd9c\ud558\ub824\uba74 <code>System.Xml<\/code> \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uc758 <code>XmlDocument<\/code> \ub610\ub294 <code>XDocument<\/code>\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/h5>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \ubc29\ubc95 1: <code>XmlDocument<\/code>\ub97c \uc0ac\uc6a9\ud558\ub294 \uc608\uc81c<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" >using System;\nusing System.Xml;\n\nclass Program\n{\n    static void Main()\n    {\n        string xml = @\"&lt;?xml version=\"\"1.0\"\" encoding=\"\"UTF-8\"\"?&gt;\n&lt;Receipt&gt;\n&lt;CONTENT&gt;\n&lt;![CDATA[&lt;head xmlns:js=\"\"javascript:code\"\"&gt;\n  &lt;meta http-equiv=\"\"X-UA-Compatible\"\" content=\"\"IE=Edge;\"\" \/&gt;\n  &lt;meta http-equiv=\"\"Content-Type\"\" content=\"\"text\/html; charset=UTF-8\"\" \/&gt;\n  &lt;meta name=\"\"viewport\"\" content=\"\"width=device-width, initial-scale=1.0\"\" \/&gt;\n  &lt;link rel=\"\"preconnect\"\" href=\"\"https:\/\/fonts.googleapis.com\"\" \/&gt;\n  &lt;link rel=\"\"preconnect\"\" href=\"\"https:\/\/fonts.gstatic.com\"\" \/&gt;\n  &lt;link href=\"\"https:\/\/fonts.googleapis.com\/css2?family=Noto+Sans+KR:wght@400;700;family=Noto+Sans:wght@700;display=swap\"\" rel=\"\"stylesheet\"\" \/&gt;\n&lt;\/head&gt;]]&gt;\n&lt;\/CONTENT&gt;\n&lt;\/Receipt&gt;\";\n\n        XmlDocument doc = new XmlDocument();\n        doc.LoadXml(xml);\n\n        var cdataContent = doc.SelectSingleNode(\"\/\/CONTENT\").InnerText;\n\n        Console.WriteLine(cdataContent);\n    }\n}\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \ubc29\ubc95 2: <code>XDocument<\/code> (LINQ to XML) \ubc29\uc2dd<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" >using System;\nusing System.Xml.Linq;\n\nclass Program\n{\n    static void Main()\n    {\n        string xml = @\"&lt;?xml version=\"\"1.0\"\" encoding=\"\"UTF-8\"\"?&gt;\n&lt;Receipt&gt;\n&lt;CONTENT&gt;&lt;![CDATA[&lt;head&gt;...&lt;\/head&gt;]]&gt;&lt;\/CONTENT&gt;\n&lt;\/Receipt&gt;\";\n\n        XDocument doc = XDocument.Parse(xml);\n        string cdata = doc.Root.Element(\"CONTENT\").Value;\n\n        Console.WriteLine(cdata);\n    }\n}\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \uacb0\uacfc<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ucd9c\ub825\uc740 CDATA \ub0b4\ubd80\uc758 HTML:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" >&lt;head xmlns:js=\"javascript:code\"&gt;\n  &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge;\" \/&gt;\n  &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\" \/&gt;\n  ...\n&lt;\/head&gt;\n<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>C#\uc5d0\uc11c &lt;![CDATA[ &#8230; ]]&gt; \uc548\uc758 \ub0b4\uc6a9\uc744 \ucd94\ucd9c\ud558\ub824\uba74 System.Xml \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uc758 XmlDocument \ub610\ub294 XDocument\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \u2705 \ubc29\ubc95 1: XmlDocument\ub97c \uc0ac\uc6a9\ud558\ub294 \uc608\uc81c \u2705 \ubc29\ubc95 2: XDocument <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=9785\" title=\"C# XML Data \ucd94\ucd9c\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":10286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[258,10],"tags":[],"class_list":["post-9785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-linq","category-devc"],"jetpack_featured_media_url":"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2026\/05\/pexels-photo-37657434.jpeg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/9785","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=9785"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/9785\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/media\/10286"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}