{"id":328,"date":"2009-07-01T06:47:56","date_gmt":"2009-07-01T06:47:56","guid":{"rendered":"http:\/\/apollo89.com\/wordpress\/?p=328"},"modified":"2013-02-02T23:44:35","modified_gmt":"2013-02-02T14:44:35","slug":"%ea%b0%9d%ec%b2%b4%eb%a5%bc-xml%ed%8c%8c%ec%9d%bc%eb%a1%9c-%eb%a7%8c%eb%93%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/apollo89.com\/wordpress\/?p=328","title":{"rendered":"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30<\/p>\n<p>xom-1.1.jar \ud30c\uc77c \ud544\uc694<\/p>\n<pre class=\"lang:java decode:true \" >import nu.xom.*;\r\nimport java.io.*;\r\nimport java.util.*;\r\npublic class Person {\r\n    private String first,last;\r\n public Person(String first, String last) {\r\n  \/\/super();\r\n  this.first = first;\r\n  this.last = last;\r\n }\r\n \r\n public Element getXML(){\r\n  Element person = new Element(\"person\");\r\n  Element firstName = new Element(\"first\");\r\n  firstName.appendChild(first);\r\n  Element lastName = new Element(\"last\");\r\n     lastName.appendChild(last);\r\n     person.appendChild(firstName);\r\n     person.appendChild(lastName);\r\n     return person;\r\n }\r\n \/\/ XML \uc5d8\ub9ac\uba3c\ud2b8\uc5d0\uc11c Person\uc744 \ubcf5\uc6d0\ud558\ub294 \uc0dd\uc131\uc790\r\n public  Person(Element person){\r\n  first = person.getFirstChildElement(\"first\").getValue();\r\n  last = person.getFirstChildElement(\"last\").getValue();\r\n }\r\n \r\n public String toString(){\r\n  return first +\" \"+ last;\r\n }\r\n \r\n \/\/ \uc0ac\ub78c\uc774 \uc77d\uc744 \uc218 \uc788\ub294 \ud615\ud0dc\ub85c \ubcc0\ud658\r\n public static void format(OutputStream os,Document doc) throws Exception{\r\n  Serializer serializer = new Serializer(os,\"ISO-8859-1\");\r\n  serializer.setIndent(4);\r\n  serializer.setMaxLength(60);\r\n  serializer.write(doc);\r\n  serializer.flush();\r\n }\r\n \r\n public static void main(String[] args) throws Exception{\r\n  \/\/ TODO Auto-generated method stub\r\n  List&lt;Person&gt; people = Arrays.asList(\r\n    new Person(\"Dr.  Juwon\",\"Sung\"),\r\n    new Person(\"\ucc2c\ud638\",\"\ubc15\"),\r\n    new Person(\"\uc138\ub9ac\",\"\ubc15\")\r\n    );\r\n  System.out.println(people);\r\n  Element root = new Element(\"people\");\r\n  for(Person p:people)\r\n   root.appendChild(p.getXML());\r\n  Document doc = new Document(root);\r\n  format(System.out,doc);\r\n  format(new BufferedOutputStream(new FileOutputStream(\"People.xml\")),doc);\r\n }\r\n}<\/pre>\n<p>\ucd9c\ucc98 : http:\/\/cafe.naver.com\/javastudy2\/12<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 xom-1.1.jar \ud30c\uc77c \ud544\uc694 import nu.xom.*; import java.io.*; import java.util.*; public class Person { private String first,last; public Person(String first, String last) { \/\/super(); this.first = first; this.last = last; } public Element getXML(){ Element person = &hellip; <a href=\"https:\/\/apollo89.com\/wordpress\/?p=328\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[662],"tags":[420,417,421,96],"class_list":["post-328","post","type-post","status-publish","format-standard","hentry","category-java-jsp","tag-xml","tag-417","tag-421","tag-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 - Apollo89.com<\/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:\/\/apollo89.com\/wordpress\/?p=328\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 - Apollo89.com\" \/>\n<meta property=\"og:description\" content=\"&nbsp; \uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 xom-1.1.jar \ud30c\uc77c \ud544\uc694 import nu.xom.*; import java.io.*; import java.util.*; public class Person { private String first,last; public Person(String first, String last) { \/\/super(); this.first = first; this.last = last; } public Element getXML(){ Element person = &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/apollo89.com\/wordpress\/?p=328\" \/>\n<meta property=\"og:site_name\" content=\"Apollo89.com\" \/>\n<meta property=\"article:published_time\" content=\"2009-07-01T06:47:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-02-02T14:44:35+00:00\" \/>\n<meta name=\"author\" content=\"apollo89\" \/>\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=\"apollo89\" \/>\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:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328\"},\"author\":{\"name\":\"apollo89\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/93f56825cac3b2f18e5f107995066c82\"},\"headline\":\"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30\",\"datePublished\":\"2009-07-01T06:47:56+00:00\",\"dateModified\":\"2013-02-02T14:44:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328\"},\"wordCount\":11,\"commentCount\":0,\"keywords\":[\"xml\",\"\uac1d\uccb4\",\"\ubcc0\ud658\",\"\uc790\ubc14\"],\"articleSection\":[\"Java\\\/JSP\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328\",\"url\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328\",\"name\":\"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 - Apollo89.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#website\"},\"datePublished\":\"2009-07-01T06:47:56+00:00\",\"dateModified\":\"2013-02-02T14:44:35+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/93f56825cac3b2f18e5f107995066c82\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=328#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\\\/\\\/apollo89.com\\\/wordpress\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/\",\"name\":\"Apollo89.com\",\"description\":\"\uc544\ud3f4\ub85c\uc528\uc758 \uc7a1\ub2e4\ud55c \uacbd\ud5d8\ub4e4..\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/93f56825cac3b2f18e5f107995066c82\",\"name\":\"apollo89\",\"description\":\"\uc544\ud3f4\ub85c89 \uc785\ub2c8\ub2e4.\",\"url\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 - Apollo89.com","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:\/\/apollo89.com\/wordpress\/?p=328","og_locale":"ko_KR","og_type":"article","og_title":"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 - Apollo89.com","og_description":"&nbsp; \uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 xom-1.1.jar \ud30c\uc77c \ud544\uc694 import nu.xom.*; import java.io.*; import java.util.*; public class Person { private String first,last; public Person(String first, String last) { \/\/super(); this.first = first; this.last = last; } public Element getXML(){ Element person = &hellip; Continue reading &rarr;","og_url":"https:\/\/apollo89.com\/wordpress\/?p=328","og_site_name":"Apollo89.com","article_published_time":"2009-07-01T06:47:56+00:00","article_modified_time":"2013-02-02T14:44:35+00:00","author":"apollo89","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"apollo89","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/apollo89.com\/wordpress\/?p=328#article","isPartOf":{"@id":"https:\/\/apollo89.com\/wordpress\/?p=328"},"author":{"name":"apollo89","@id":"https:\/\/apollo89.com\/wordpress\/#\/schema\/person\/93f56825cac3b2f18e5f107995066c82"},"headline":"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30","datePublished":"2009-07-01T06:47:56+00:00","dateModified":"2013-02-02T14:44:35+00:00","mainEntityOfPage":{"@id":"https:\/\/apollo89.com\/wordpress\/?p=328"},"wordCount":11,"commentCount":0,"keywords":["xml","\uac1d\uccb4","\ubcc0\ud658","\uc790\ubc14"],"articleSection":["Java\/JSP"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/apollo89.com\/wordpress\/?p=328#respond"]}]},{"@type":"WebPage","@id":"https:\/\/apollo89.com\/wordpress\/?p=328","url":"https:\/\/apollo89.com\/wordpress\/?p=328","name":"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30 - Apollo89.com","isPartOf":{"@id":"https:\/\/apollo89.com\/wordpress\/#website"},"datePublished":"2009-07-01T06:47:56+00:00","dateModified":"2013-02-02T14:44:35+00:00","author":{"@id":"https:\/\/apollo89.com\/wordpress\/#\/schema\/person\/93f56825cac3b2f18e5f107995066c82"},"breadcrumb":{"@id":"https:\/\/apollo89.com\/wordpress\/?p=328#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/apollo89.com\/wordpress\/?p=328"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/apollo89.com\/wordpress\/?p=328#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/apollo89.com\/wordpress"},{"@type":"ListItem","position":2,"name":"\uac1d\uccb4\ub97c xml\ud30c\uc77c\ub85c \ub9cc\ub4e4\uae30"}]},{"@type":"WebSite","@id":"https:\/\/apollo89.com\/wordpress\/#website","url":"https:\/\/apollo89.com\/wordpress\/","name":"Apollo89.com","description":"\uc544\ud3f4\ub85c\uc528\uc758 \uc7a1\ub2e4\ud55c \uacbd\ud5d8\ub4e4..","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/apollo89.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/apollo89.com\/wordpress\/#\/schema\/person\/93f56825cac3b2f18e5f107995066c82","name":"apollo89","description":"\uc544\ud3f4\ub85c89 \uc785\ub2c8\ub2e4.","url":"https:\/\/apollo89.com\/wordpress\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328"}],"version-history":[{"count":0,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}