<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>oksure.org &#187; zeroboard</title>
	<atom:link href="http://oksure.org/archives/tag/zeroboard/feed" rel="self" type="application/rss+xml" />
	<link>http://oksure.org</link>
	<description>Awaiting Star: Season 2 -- Never feel emptiness, never get isolated.</description>
	<lastBuildDate>Tue, 30 Aug 2011 12:22:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Migration: Zeroboard to WordPress (Using Ruby)</title>
		<link>http://oksure.org/archives/961?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=migration-zeroboard-to-wordpress-using-ruby</link>
		<comments>http://oksure.org/archives/961#comments</comments>
		<pubDate>Sat, 22 Nov 2008 05:48:12 +0000</pubDate>
		<dc:creator>oksure</dc:creator>
				<category><![CDATA[컴퓨터]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[zeroboard]]></category>

		<guid isPermaLink="false">http://oksure.org/?p=961</guid>
		<description><![CDATA[오늘 하루 내가 겪은 제로보드에서 워드프레스로의 이동에 대해서 간략히 정리해 놓고자 한다. 옮길 테이블 정하기 나의 경우에는 freeboard, letters, link 등 총 7개 게시판을 옮기기로 계획했다. DB Backup &#38; 로컬 SQL 서버에 Restore 기존 제로보드 홈페이지에서 DB를 백업 받는다. 나의 경우 호스팅 업체에서 sqldump로 전체 DB를 백업 받을 수 있도록 되어 있었다. 다운로드 받은 sql [...]]]></description>
			<content:encoded><![CDATA[<p>오늘 하루 내가 겪은 제로보드에서 워드프레스로의 이동에 대해서 간략히 정리해 놓고자 한다.</p>
<ol>
<li><strong>옮길 테이블 정하기<br />
</strong>나의 경우에는 freeboard, letters, link 등 총 7개 게시판을 옮기기로 계획했다.</li>
<li><strong>DB Backup &amp; 로컬 SQL 서버에 Restore</strong><br />
기존 제로보드 홈페이지에서 DB를 백업 받는다. 나의 경우 호스팅 업체에서 sqldump로 전체 DB를 백업 받을 수 있도록 되어 있었다. 다운로드 받은 sql 파일을 로컬 서버의 mysql 콘솔을 통해서 restore한다.</li>
<li><strong>Ruby Gem Install<br />
</strong>내가 사용했던 gem들은 mysql-ruby와 libxml이었다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p961code3'); return false;">View Code</a> RUBY</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9613"><td class="code" id="p961code3"><pre class="ruby" style="font-family:monospace;">install gem mysql<span style="color:#006600; font-weight:bold;">-</span>ruby
install gem libxml</pre></td></tr></table></div>

<p>나의 경우에는 처음에 이렇게 설치하고 irb에서 require &#8216;mysql&#8217; 을 했을 때 &#8220;invalid win32 application&#8221;이라고 에러가 났었는데, sql server를 64bit 버전으로 설치한 것이 문제였다. sql server를 32bit로 다시 설치했다. 각각 API Doc 주소는 다음과 같다.<br />
mysql: <a href="http://www.tmtm.org/en/mysql/ruby/" target="_blank">http://www.tmtm.org/en/mysql/ruby/</a><br />
libxml: <a href="http://libxml.rubyforge.org/rdoc/index.html " target="_blank">http://libxml.rubyforge.org/rdoc/index.html </a></li>
<li><strong>Zeroboard의 field와 WordPress XML 포맷의 element 매칭</strong><br />
제로보드는 sql server의 DB를 뒤져보면 필드가 쭉 나오는데, 문제는 워드프레스의 경우 DTD도 마땅히 찾기 힘들다는데 문제가 있었다. <a href="http://techfold.com/2007/07/12/part-one-dissecting-the-wordpress-importexport-format-categories/">이 사이트</a>를 참고해서 WXR에 대해서도 대략 알게 되었다. 내가 정리한 board와 comment 테이블에서의 zeroboard와 wxr의 관계는 다음과 같다. </p>
<ul>
<li>zetyx_[boardname] &lt;=&gt; WXR item
<ul>
<li>no &lt;=&gt; wp:post_id</li>
<li>memo &lt;=&gt; content:encoded</li>
<li>name &lt;=&gt; dc:creator</li>
<li>subject &lt;=&gt; title</li>
<li>reg_date &lt;=&gt; pubDate, wp:post_date, wp:post_date_gmt</li>
</ul>
</li>
<li>zetyx_comment_[boardname] &lt;=&gt; WXR item
<ul>
<li>no &lt;=&gt; wp:comment_id</li>
<li>name &lt;=&gt; wp:comment_author</li>
<li>memo &lt;=&gt; wp:comment_content</li>
<li>ip &lt;=&gt; wp:comment_author_IP</li>
<li>reg_date &lt;=&gt; wp:comment_date, wp:comment_date_gmt</li>
</ul>
</li>
</ul>
</li>
<li><strong>Ruby 코드 짜기</strong><br />
실제 루비 코드를 짜는데 있어서 크게 두 가지 정도가 방해가 되었는데, 하나는 xml encoding을 utf-8으로 기록하는 것과 CDATA 블럭을 넣는 방법을 몰랐었다. 둘 다 <a href="http://libxml.rubyforge.org/rdoc/index.html " target="_blank">RDoc</a>에 나오니까 &#8220;찾기&#8221;를 사용해서 찾으면 금방 나올 것이다. (내가 사용했던 코드는 이 글 제일 아래에 붙여 놓았다.)</li>
<li><strong>WordPress에서 import하기<br />
</strong>여기서 결정적으로 난국에 부딪혔던 것이 한글 문제였는데, 처음에 import 했을 때 한글이 다 깨져서 나오길래 왜 그런가 하고 봤더니 ruby에서 저장한 문서는 ANSI로 저장이 되어 있어서 그랬다. 편집기로 열어서 다른 이름으로 저장을 해서 UTF-8으로 저장하고 import하면 깔끔하게 된다. 이어서 또 귀찮았던 것은 import할 때 사람 이름이 user로 등록되어 있지 않으면 어떻게 처리할지 모두 다 물어보는 것이었다. 한글 아이디는 생성이 안 되기 때문에 모든 한글 이름을 그에 해당하는 영문 id를 입력해 주었다. 마지막으로 파일 크기가 너무 크면 한 번에 잘 업로드가 안 되니까 한 50개에서 100개 정도로 끊어서 import하는 것이 (최소한 내 경험 상에서는) 적절한 듯 싶다.</li>
</ol>
<p>다음은 내가 짰던 코드다.</p>
<p><strong>main.rb</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p961code4'); return false;">View Code</a> RUBY</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9614"><td class="code" id="p961code4"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># To change this template, choose Tools | Templates</span>
<span style="color:#008000; font-style:italic;"># and open the template in the editor.</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Hello World&quot;</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;mysql&quot;</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;xml&quot;</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#####</span>
<span style="color:#008000; font-style:italic;"># Creating basic rss</span>
<span style="color:#008000; font-style:italic;">#####</span>
&nbsp;
doc = <span style="color:#6666ff; font-weight:bold;">XML::Document</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
doc.<span style="color:#9900CC;">encoding</span> = <span style="color:#6666ff; font-weight:bold;">XML::Encoding</span>.<span style="color:#9900CC;">encoding_to_s</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">XML::Encoding::UTF8</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
doc.<span style="color:#9900CC;">root</span> = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'rss'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
root = doc.<span style="color:#9900CC;">root</span>
root<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'version'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'2.0'</span>
root<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'xmlns:content'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'http://purl.org/rss/1.0/modules/content/'</span>
root<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'xmlns:wfw'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'http://wellformedweb.org/CommentAPI/'</span>
root<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'xmlns:dc'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'http://purl.org/dc/elements/1.1/'</span>
root<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'xmlns:wp'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'http://wordpress.org/export/1.0/'</span>
&nbsp;
root <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; channel = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'channel'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; title = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'title'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'oksure.org'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; link = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'link'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'http://oksure.byus.net/09012003'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; description = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'description'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'oksure.org'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; pubDate = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'pubDate'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'Wed, 10 Sep 2003 00:00:00 +0000'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; generator = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'generator'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'http://wordpress.org/?v=MU'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; language = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'language'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'ko'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_wxr_version = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:wxr_version'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'1.0'</span>
channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category_nickname = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category_nickname'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'season1'</span>
wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category_parent = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category_parent'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_cat_name = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:cat_name'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'Season 1'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category_description = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category_description'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'Archive from oksure.org [2003-2004] '</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'banner'</span>, <span style="color:#996600;">'diary'</span>, <span style="color:#996600;">'freeboard'</span>, <span style="color:#996600;">'letter'</span>, <span style="color:#996600;">'link'</span>, <span style="color:#996600;">'profile'</span>, <span style="color:#996600;">'poem'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>category<span style="color:#006600; font-weight:bold;">|</span>
	channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
	wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category_nickname = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category_nickname'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; category
	wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_category_parent = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:category_parent'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'Season 1'</span>
	wp_category <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_cat_name = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:cat_name'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>category.<span style="color:#9900CC;">capitalize</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#####</span>
<span style="color:#008000; font-style:italic;"># MySQL part</span>
<span style="color:#008000; font-style:italic;">#####</span>
&nbsp;
db = Mysql.<span style="color:#9900CC;">real_connect</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;localhost&quot;</span>, <span style="color:#996600;">&quot;root&quot;</span>, <span style="color:#996600;">&quot;********&quot;</span>, <span style="color:#996600;">&quot;oksurenet_backup_20081120&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
zb = <span style="color:#996600;">&quot;zetyx_&quot;</span>
boards = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;freeboard&quot;</span>, <span style="color:#996600;">&quot;4u_poem&quot;</span>, <span style="color:#996600;">&quot;letters&quot;</span>, <span style="color:#996600;">&quot;profile&quot;</span>, <span style="color:#996600;">&quot;link&quot;</span>, <span style="color:#996600;">&quot;diary&quot;</span>, <span style="color:#996600;">&quot;main_ban&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
boards.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>board<span style="color:#006600; font-weight:bold;">|</span>
	<span style="color:#CC0066; font-weight:bold;">puts</span> board <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot; is being processed.&quot;</span>
&nbsp;
	category_name = board <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;main_ban&quot;</span>, <span style="color:#996600;">&quot;4u_poem&quot;</span>, <span style="color:#996600;">&quot;letters&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>board<span style="color:#006600; font-weight:bold;">&#41;</span>
	<span style="color:#9966CC; font-weight:bold;">if</span> board == <span style="color:#996600;">&quot;letters&quot;</span>
		category_name = <span style="color:#996600;">&quot;letter&quot;</span>
	<span style="color:#9966CC; font-weight:bold;">elsif</span> board == <span style="color:#996600;">&quot;main_ban&quot;</span>
		category_name = <span style="color:#996600;">&quot;banner&quot;</span>
	<span style="color:#9966CC; font-weight:bold;">elsif</span> board == <span style="color:#996600;">&quot;4u_poem&quot;</span>
		category_name = <span style="color:#996600;">&quot;poem&quot;</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
	result = db.<span style="color:#9900CC;">query</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;SELECT * FROM &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> zb <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;board_&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> board<span style="color:#006600; font-weight:bold;">&#41;</span>
	result.<span style="color:#9900CC;">each_hash</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>row<span style="color:#006600; font-weight:bold;">|</span>
		channel <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; item = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'item'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; title = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'title'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;subject&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; link = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'link'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; pubDate = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'pubDate'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;reg_date&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%a, %d %b %Y %H:%M:%S +0000&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; dc_creator = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'dc:creator'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;name&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; category = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'category'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>category_name.<span style="color:#9900CC;">capitalize</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; category = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'category'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>category_name.<span style="color:#9900CC;">capitalize</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		category<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'domain'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'category'</span>
		category<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'nicename'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = category_name
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; guid = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'guid'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		guid<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'isPermaLink'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'false'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; description = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'description'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; content_encoded = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'content:encoded'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;memo&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; content_excerpt = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'content:excerpt'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_id = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_id'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;no&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_date = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_date'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;reg_date&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%d %H:%M:%S&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_date_gmt = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_date_gmt'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;reg_date&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">-</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">60</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#006666;">60</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%d %H:%M:%S&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_status = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_status'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'open'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_ping_status = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:ping_status'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'open'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_name = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_name'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_status = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:status'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'publish'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_parent = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_parent'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'0'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_menu_order = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:menu_order'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'0'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_type = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_type'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'post'</span>
		item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_post_password = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:post_password'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
		result_comment = db.<span style="color:#9900CC;">query</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;SELECT * FROM &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> zb <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;board_comment_&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> board <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot; where parent = &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;no&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
		result_comment.<span style="color:#9900CC;">each_hash</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>row_comment<span style="color:#006600; font-weight:bold;">|</span>
			item <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_id = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_id'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; row_comment<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;no&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_author = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_author'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>row_comment<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;name&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_author_email = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_author_email'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_url = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_url'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_IP = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_IP'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; row_comment<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;ip&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_date = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_date'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>row_comment<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;reg_date&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%d %H:%M:%S&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_date_gmt = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_date_gmt'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>row_comment<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;reg_date&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">-</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">60</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#006666;">60</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%d %H:%M:%S&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_content = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_content'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new_cdata</span><span style="color:#006600; font-weight:bold;">&#40;</span>row_comment<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;memo&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_approved = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_approved'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'1'</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_type = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_type'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_parent = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_parent'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'0'</span>
			wp_comment <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; wp_comment_user_id = <span style="color:#6666ff; font-weight:bold;">XML::Node</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'wp:comment_user_id'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">'0'</span>
		<span style="color:#9966CC; font-weight:bold;">end</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
	<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Number of rows returned: #{result.num_rows}&quot;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;===== Created WXR (Wordpress eXtended Rss) file =====&quot;</span>
&nbsp;
db.<span style="color:#9900CC;">close</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#####</span>
<span style="color:#008000; font-style:italic;"># Writing XML</span>
<span style="color:#008000; font-style:italic;">#####</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">format</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
doc.<span style="color:#9900CC;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'C:<span style="color:#000099;">\l</span>ibxml.xml'</span>, <span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://oksure.org/archives/961/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

