<?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>델리 키포스</title>
	<atom:link href="http://kiipos.delimount.net/feed" rel="self" type="application/rss+xml" />
	<link>http://kiipos.delimount.net</link>
	<description>춤을 추는 거야. 음악이 계속되는 한.</description>
	<lastBuildDate>Wed, 10 Mar 2010 04:35:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone, HTTP로 XML 데이터 요청 및 처리 예제</title>
		<link>http://kiipos.delimount.net/1084</link>
		<comments>http://kiipos.delimount.net/1084#comments</comments>
		<pubDate>Wed, 10 Mar 2010 04:14:55 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[아이폰]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=1084</guid>
		<description><![CDATA[몇일 전 iPhone에서 HTTP로 XML 데이터 요청하는 예제를 올렸다가 iPhone SDK에서 NSXMLDocument 클래스를 지원하지 않는 다는 것을 확인하고 NSXMLParser 클래스를 이용해서 XML 데이터를 처리하는 예제를 다시 준비했습니다. 아마도 iPhone에서 NSXMLDocument를 지원하지 않는 건 NSXMLDocument가 메모리를 많이 먹기 때문인 아닐까 싶습니다.
NSXMLParser는 XML 문서를 순차적으로 분석(parse)하면서 이벤트별 처리를 위임(delegate)하는 방식입니다. 따라서 NSXMLDocument를 사용하는 예제보다는 훨씬 더 복잡합니다. [...]]]></description>
			<content:encoded><![CDATA[<p>몇일 전 <a href="http://kiipos.delimount.net/980">iPhone에서 HTTP로 XML 데이터 요청하는 예제</a>를 올렸다가 iPhone SDK에서 NSXMLDocument 클래스를 지원하지 않는 다는 것을 확인하고 NSXMLParser 클래스를 이용해서 XML 데이터를 처리하는 예제를 다시 준비했습니다. 아마도 iPhone에서 NSXMLDocument를 지원하지 않는 건 NSXMLDocument가 메모리를 많이 먹기 때문인 아닐까 싶습니다.</p>
<p><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/Reference/Reference.html">NSXMLParser</a>는 XML 문서를 순차적으로 분석(parse)하면서 이벤트별 처리를 위임(delegate)하는 방식입니다. 따라서 NSXMLDocument를 사용하는 예제보다는 훨씬 더 복잡합니다. 참고로 iPhone에서 사용할 수 있는 <a href="http://note.marines.co.kr/124">XML 관련 라이브러리</a>들이 개발되어 있기 때문에 해당 라이브러리를 익혀서 사용하는 것이 개발 효율은 더 좋을 것 같습니다. 하지만 NSXMLParser를 이용해서 구현하는 것도 나름 장점은 있으니 직접 작성하는 것도 나쁘진 않을 듯 합니다.</p>
<p>예제에 포함된 파일 목록은 아래와 같습니다.</p>
<table>
<tr>
<th>파일</th>
<th>설명</th>
</tr>
<tr>
<td>showrooms.xml</td>
<td>XML 파일</td>
</tr>
<tr>
<td>Dealer.h <br /> Dealer.m</td>
<td>Dealer 모델 클래스</td>
</tr>
<tr>
<td>Showroom.h <br /> Showroom.m</td>
<td>Showroom 모델 클래스</td>
</tr>
<tr>
<td>ShowroomsXmlParse.h <br /> ShowroomsXmlParse.m</td>
<td>showrooms.xml용 파서 클래스</td>
</tr>
<tr>
<td>showrooms_xml_parser.m</td>
<td>실행(main) 소스</td>
</tr>
</table>
<p>우선 showrooms.xml은 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showrooms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>강남전시장<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phone<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>02-111-1111<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phone<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dealer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>김태연<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dealer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>삼성전시장<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phone<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>02-222-2222<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phone<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dealer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>구하라<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dealer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/showrooms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>예제에서 showroom 및 dealer 엘리먼트가 각각 name 엘리먼트를 자식으로 가지도록 작성했습니다.</p>
<p>Dealer.h와 Dealer.m은 다음과 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">@interface</span> Dealer <span style="color: #002200;">:</span> <span style="color: #400080;">NSObject</span>
<span style="color: #002200;">&#123;</span>
  <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> _name;
<span style="color: #002200;">&#125;</span>
  <span style="color: #a61390;">@property</span><span style="color: #002200;">&#40;</span> copy <span style="color: #002200;">&#41;</span> <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> name;
<span style="color: #a61390;">@end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;Dealer.h&quot;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">@implementation</span> Dealer
  <span style="color: #a61390;">@synthesize</span> name <span style="color: #002200;">=</span> _name;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>Showroom.h와 Showroom.m은 다음과 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;Dealer.h&quot;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">@interface</span> Showroom <span style="color: #002200;">:</span> <span style="color: #400080;">NSObject</span>
<span style="color: #002200;">&#123;</span>
  <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> _name;
  <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> _phone;
  Dealer<span style="color: #002200;">*</span> _dealer;
<span style="color: #002200;">&#125;</span>
  <span style="color: #a61390;">@property</span><span style="color: #002200;">&#40;</span> copy <span style="color: #002200;">&#41;</span> <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> name;
  <span style="color: #a61390;">@property</span><span style="color: #002200;">&#40;</span> copy <span style="color: #002200;">&#41;</span> <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> phone;
  <span style="color: #a61390;">@property</span><span style="color: #002200;">&#40;</span> retain <span style="color: #002200;">&#41;</span> Dealer<span style="color: #002200;">*</span> dealer;
<span style="color: #a61390;">@end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;Showroom.h&quot;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">@implementation</span> Showroom
  <span style="color: #a61390;">@synthesize</span> name <span style="color: #002200;">=</span> _name;
  <span style="color: #a61390;">@synthesize</span> phone <span style="color: #002200;">=</span> _phone;
  <span style="color: #a61390;">@synthesize</span> dealer <span style="color: #002200;">=</span> _dealer;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>NSXMLParser는 NSXMLDocument의 NSXMLNode처럼 모델이 없기 때문에 분석(parse) 결과를 담을 수 있는 모델이 필요합니다. 이 모델 클래스들은 MVC에도 적용될 수 있기 때문에 모델 클래스를 만들어 두면 조금 더 우아한 프로그래밍할 수 있습니다. 모델 클래스들은 간단하기 때문에 자세한 설명은 생략하도록 하겠습니다. </p>
<p>ShowroomsXmlParser.h는 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;Showroom.h&quot;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">@interface</span> ShowroomsXmlParser <span style="color: #002200;">:</span> <span style="color: #400080;">NSObject</span> &lt; NSXMLParserDelegate &gt;
<span style="color: #002200;">&#123;</span>
  <span style="color: #400080;">NSMutableArray</span><span style="color: #002200;">*</span> _showrooms;
  <span style="color: #400080;">NSMutableArray</span><span style="color: #002200;">*</span> _elementStack;
<span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSMutableArray</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> parseContentOfUrl<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSURL</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> url;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>ShowroomsXmlParser는 NSXMLParser가 발생시키는 event를 처리해서 Showroom 객체 배열을 넘겨주는 클래스입니다. NSXMLParser가 위임(delegate)하는 method들을 처리하기 위해서 <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/NSXMLParserDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/NSXMLParserDelegate">NSXMLParserDelegate</a> 프로토콜을 구현해야 합니다. 참고로 프로토콜은 자바에서 interface랑 동일합니다. 멤버 변수 _elementStack은 파서의 트리 탐색 경로 및 정보를 담아두는 스택입니다.</p>
<p>ShowroomsXmlParse.m은 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;ShowroomsXmlParser.h&quot;</span>
&nbsp;
&nbsp;
<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> <span style="color: #a61390;">const</span> SHOWROOM <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;showroom&quot;</span>;
<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> <span style="color: #a61390;">const</span> DEALER <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;dealer&quot;</span>;
<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> <span style="color: #a61390;">const</span> NAME <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;name&quot;</span>;
<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> <span style="color: #a61390;">const</span> PHONE <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;phone&quot;</span>;
&nbsp;
&nbsp;
<span style="color: #a61390;">@implementation</span> ShowroomsXmlParser
  <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> parser<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSXMLParser</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> parser 
      didStartElement<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> elementName 
      namespaceURI<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> namespaceURI 
      qualifiedName<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> qualifiedName 
      attributes<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSDictionary</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> attributeDict
  <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> elementName isEqualToString<span style="color: #002200;">:</span> SHOWROOM <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      Showroom<span style="color: #002200;">*</span> showroom <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> Showroom new <span style="color: #002200;">&#93;</span>;
      <span style="color: #002200;">&#91;</span> _elementStack addObject<span style="color: #002200;">:</span> showroom <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
    <span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> elementName isEqualToString<span style="color: #002200;">:</span> DEALER <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      Dealer<span style="color: #002200;">*</span> dealer <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> Dealer new <span style="color: #002200;">&#93;</span>;
      Showroom<span style="color: #002200;">*</span> showroom <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>Showroom<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span> _elementStack lastObject <span style="color: #002200;">&#93;</span>;
      <span style="color: #002200;">&#91;</span> showroom setDealer<span style="color: #002200;">:</span> dealer <span style="color: #002200;">&#93;</span>;
&nbsp;
      <span style="color: #002200;">&#91;</span> _elementStack addObject<span style="color: #002200;">:</span> dealer <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
    <span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> elementName isEqualToString<span style="color: #002200;">:</span> NAME <span style="color: #002200;">&#93;</span> ||
      TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> elementName isEqualToString<span style="color: #002200;">:</span> PHONE <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> element <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSString</span> stringWithString<span style="color: #002200;">:</span> elementName <span style="color: #002200;">&#93;</span>;
      <span style="color: #002200;">&#91;</span> _elementStack addObject<span style="color: #002200;">:</span> element <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">&#125;</span>
&nbsp;
  <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> parser<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSXMLParser</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> parser
      foundCharacters<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> <span style="color: #a61390;">string</span>
  <span style="color: #002200;">&#123;</span>
    <span style="color: #400080;">NSCharacterSet</span><span style="color: #002200;">*</span> characterSet <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSCharacterSet</span> 
      whitespaceAndNewlineCharacterSet <span style="color: #002200;">&#93;</span>;
    <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> trimmedValue <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #a61390;">string</span> stringByTrimmingCharactersInSet<span style="color: #002200;">:</span>
      characterSet <span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> trimmedValue length <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      <span style="color: #a61390;">return</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #a61390;">id</span> element <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> _elementStack lastObject <span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> element isKindOfClass<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSString</span> class <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      <span style="color: #002200;">&#91;</span> _elementStack removeLastObject <span style="color: #002200;">&#93;</span>;
      <span style="color: #a61390;">id</span> parentElement <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> _elementStack lastObject <span style="color: #002200;">&#93;</span>;
      <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> element isEqualToString<span style="color: #002200;">:</span> PHONE <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
      <span style="color: #002200;">&#123;</span>
        Showroom<span style="color: #002200;">*</span> showroom <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>Showroom<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>parentElement;
        <span style="color: #002200;">&#91;</span> showroom setPhone<span style="color: #002200;">:</span> trimmedValue <span style="color: #002200;">&#93;</span>;
      <span style="color: #002200;">&#125;</span>
      <span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> element isEqualToString<span style="color: #002200;">:</span> NAME <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
      <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> parentElement isMemberOfClass<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span> Showroom class <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
        <span style="color: #002200;">&#123;</span>
          Showroom<span style="color: #002200;">*</span> showroom <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>Showroom<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>parentElement;
          <span style="color: #002200;">&#91;</span> showroom setName<span style="color: #002200;">:</span> trimmedValue <span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#125;</span>
        <span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> parentElement isMemberOfClass<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span> Dealer class <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
        <span style="color: #002200;">&#123;</span>
          Dealer<span style="color: #002200;">*</span> dealer <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>Dealer<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>parentElement;
          <span style="color: #002200;">&#91;</span> dealer setName<span style="color: #002200;">:</span> trimmedValue <span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#125;</span>
      <span style="color: #002200;">&#125;</span>
    <span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">&#125;</span>
&nbsp;
  <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> parser<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSXMLParser</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> parser 
      didEndElement<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> elementName
      namespaceURI<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> namespaceURI 
      qualifiedName<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> qName
  <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> elementName isEqualToString<span style="color: #002200;">:</span> SHOWROOM <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      Showroom<span style="color: #002200;">*</span> showroom <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>Showroom<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span> _elementStack lastObject <span style="color: #002200;">&#93;</span>;
      <span style="color: #002200;">&#91;</span> _showrooms addObject<span style="color: #002200;">:</span> showroom <span style="color: #002200;">&#93;</span>;
      <span style="color: #002200;">&#91;</span> _elementStack removeLastObject <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> TRUE <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> elementName isEqualToString<span style="color: #002200;">:</span> DEALER <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      <span style="color: #002200;">&#91;</span> _elementStack removeLastObject <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">&#125;</span>
&nbsp;
  <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSMutableArray</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> parseContentOfUrl<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSURL</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> url
  <span style="color: #002200;">&#123;</span>
    <span style="color: #400080;">NSXMLParser</span><span style="color: #002200;">*</span> xmlParser <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSXMLParser</span> alloc <span style="color: #002200;">&#93;</span> 
      initWithContentsOfURL<span style="color: #002200;">:</span> url <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span> xmlParser setDelegate<span style="color: #002200;">:</span> self <span style="color: #002200;">&#93;</span>;
&nbsp;
    _showrooms <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSMutableArray</span> arrayWithCapacity<span style="color: #002200;">:</span> <span style="color: #2400d9;">1024</span> <span style="color: #002200;">&#93;</span>;
    _elementStack <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSMutableArray</span> arrayWithCapacity<span style="color: #002200;">:</span> <span style="color: #2400d9;">1024</span> <span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #002200;">&#91;</span> xmlParser parse <span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #002200;">&#91;</span> xmlParser release <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span> _elementStack release <span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #a61390;">return</span> _showrooms;
  <span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span></pre></div></div>

<p>NSXMLParser가 동작하기 위해서는 최소한 아래의 메소드들이 구현되어야 합니다. </p>
<ul>
<li><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/NSXMLParserDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSXMLParserDelegate/parser:didStartElement:namespaceURI:qualifiedName:attributes:">parser:didStartElement:namespaceURI:qualifiedName:attributes:</a> (이하 didStart)</li>
<li><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/NSXMLParserDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSXMLParserDelegate/parser:foundCharacters:">parser:foundCharacters:</a> (이하 found)</li>
<li><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/NSXMLParserDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSXMLParserDelegate/parser:didEndElement:namespaceURI:qualifiedName:">parser:didEndElement:namespaceURI:qualifiedName:</a> (이하 didEnd)</li>
</ul>
<p>didStart는 파서가 엘리먼트의 시작 태그를 만났을 때 호출됩니다. 비단말(nonterminal) 노드인 경우 엘리먼트 해당하는 모델 객체를 생성한 후 스택에 넣습니다. 단말(terminal) 노드인 경우 엘리먼트 이름으로 NSString 객체를 만들 후 스택에 넣습니다.</p>
<p>found는 파서가 엘리먼트를 제외한 스트링을 만날을 때 호출됩니다. 인자로 넘어온 스트링의 앞뒤 공백을 제거합니다. 유효한 스트링(이하 속성값)인 경우 스택에서 마지막으로 추가된 NSString 객체를 제거합니다. 제거된 NSString 객체의 값에 따라 적절한 부모 모델 객체의 속성(property)을 속성값으로 설정합니다. 만약 엘리먼트 이름이 NAME인 경우 중복되기 때문에 부모 모델 객체 클래스에 확인합니다.</p>
<p>didEnd는 파서가 엘리먼트의 종료 태그를 만났을 때 호출됩니다. 스택에서 모델 객체를 제거하고 SHOWROOM인 경우 _showrooms 배열 객체에 해당 객체를 추가합니다.</p>
<p>끝으로 콘솔 화면에서 결과를 확인할 수 있는 showrooms_xml_parser.m 파일은 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;ShowroomsXmlParser.h&quot;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">int</span> main<span style="color: #002200;">&#40;</span> <span style="color: #a61390;">int</span> argc, <span style="color: #a61390;">char</span><span style="color: #002200;">*</span> argv<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
  <span style="color: #400080;">NSAutoreleasePool</span><span style="color: #002200;">*</span> pool <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSAutoreleasePool</span> new <span style="color: #002200;">&#93;</span>;
&nbsp;
  ShowroomsXmlParser<span style="color: #002200;">*</span> xmlParser <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> ShowroomsXmlParser new <span style="color: #002200;">&#93;</span>;
  <span style="color: #400080;">NSURL</span><span style="color: #002200;">*</span> url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span> 
    <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://www.yourserver.com/showrooms.xml&quot;</span> <span style="color: #002200;">&#93;</span>;
  <span style="color: #400080;">NSMutableArray</span><span style="color: #002200;">*</span> showrooms <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> xmlParser parseContentOfUrl<span style="color: #002200;">:</span> url <span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span> Showroom<span style="color: #002200;">*</span> showroom <span style="color: #a61390;">in</span> showrooms <span style="color: #002200;">&#41;</span>
  <span style="color: #002200;">&#123;</span>
    Dealer<span style="color: #002200;">*</span> dealer <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> showroom dealer <span style="color: #002200;">&#93;</span>;
    NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@ %@ (%@)&quot;</span>, <span style="color: #002200;">&#91;</span> showroom name <span style="color: #002200;">&#93;</span>, <span style="color: #002200;">&#91;</span> showroom phone <span style="color: #002200;">&#93;</span>, 
      <span style="color: #002200;">&#91;</span> dealer name <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>;
  <span style="color: #002200;">&#125;</span>
&nbsp;
  <span style="color: #002200;">&#91;</span> xmlParser release <span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span> url release <span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #002200;">&#91;</span> pool drain <span style="color: #002200;">&#93;</span>;
  <span style="color: #a61390;">return</span> <span style="color: #2400d9;">0</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>해당 소스들을 컴파일 하기 위해서는 아래의 명령어를 실행합니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-framework</span> Foundation Dealer.m Showroom.m ShowroomsXmlParser.m showrooms_xml_parser.m <span style="color: #660033;">-o</span> 
showrooms_xml_parser</pre></div></div>

<p>실행 결과 화면은 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>showrooms_xml_parser
강남전시장 02-<span style="color: #000000;">111</span>-<span style="color: #000000;">1111</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>김태연<span style="color: #7a0874; font-weight: bold;">&#41;</span>
삼성전시장 02-<span style="color: #000000;">222</span>-<span style="color: #000000;">2222</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>구하라<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>프로그래밍에 도움되길 바랍니다~</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/92EjM3+iPhone%2C+HTTP%EB%A1%9C+XML+%EB%8D%B0%EC%9D%B4%ED%84%B0+%EC%9A%94%EC%B2%AD+%EB%B0%8F+%EC%B2%98%EB%A6%AC+%EC%98%88%EC%A0%9C+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/1084&amp;title=iPhone%2C+HTTP%EB%A1%9C+XML+%EB%8D%B0%EC%9D%B4%ED%84%B0+%EC%9A%94%EC%B2%AD+%EB%B0%8F+%EC%B2%98%EB%A6%AC+%EC%98%88%EC%A0%9C" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/1084/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS X, HTTP로 XML 데이터 요청 예제</title>
		<link>http://kiipos.delimount.net/980</link>
		<comments>http://kiipos.delimount.net/980#comments</comments>
		<pubDate>Tue, 02 Mar 2010 07:39:21 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[아이폰]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=980</guid>
		<description><![CDATA[오래 간만에 포스팅합니다. 요즘 트위터 때문에 블로그에 소홀해진 것도 있지만 아이폰과 안드로이드 애플케이션(이하, 앱) 개발에 여념이 없습니다. 스마트폰 대세라 흐름을 따라 가는 것도 있지만 주로 웹 서비스만 개발하다 보니 오래 간만에 접하는 애플리케이션 형태의 제품 개발 자체가 매우 흥미롭습니다.
그런데 요즘 왠만한 앱에는 HTTP를 통해서 XML 데이터를 가져와서 보여주는 기능이 들어가는 데 막상 개발 참고하려고 구글 [...]]]></description>
			<content:encoded><![CDATA[<p>오래 간만에 포스팅합니다. 요즘 트위터 때문에 블로그에 소홀해진 것도 있지만 아이폰과 안드로이드 애플케이션(이하, 앱) 개발에 여념이 없습니다. 스마트폰 대세라 흐름을 따라 가는 것도 있지만 주로 웹 서비스만 개발하다 보니 오래 간만에 접하는 애플리케이션 형태의 제품 개발 자체가 매우 흥미롭습니다.</p>
<p>그런데 요즘 왠만한 앱에는 HTTP를 통해서 XML 데이터를 가져와서 보여주는 기능이 들어가는 데 막상 개발 참고하려고 구글 검색해보면 마땅한 예제가 없어서 간단하게 예제를 작성해보았습니다.</p>
<p>요청하는 XML 문서(hello.xml)는 아래와 같이 작성했습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showrooms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>강남전시장<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;phone_number<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>02-111-1111<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phone_number<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>삼성전시장<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;phone_number<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>02-222-2222<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phone_number<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>한남전시장<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;phone_number<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>02-333-3333<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phone_number<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/showroom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/showrooms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>해당 XML 데이터를 HTTP를 통해서 가져와서 처리하는 예제는 아래와 같습니다. 간단하게 실행 되는 것을 확인하기 위해서 컨솔 창에서 돌아가도록 작성했습니다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">int</span> main<span style="color: #002200;">&#40;</span> <span style="color: #a61390;">int</span> argc, <span style="color: #a61390;">char</span><span style="color: #002200;">*</span> argv<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
  <span style="color: #400080;">NSAutoreleasePool</span><span style="color: #002200;">*</span> pool <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSAutoreleasePool</span> new <span style="color: #002200;">&#93;</span>;
  <span style="color: #400080;">NSURL</span><span style="color: #002200;">*</span> url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://www,yourserver.com/hello.xml&quot;</span> <span style="color: #002200;">&#93;</span>;
  <span style="color: #400080;">NSError</span><span style="color: #002200;">*</span> error;
  <span style="color: #400080;">NSXMLDocument</span><span style="color: #002200;">*</span> xmlDocument <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> <span style="color: #002200;">&#91;</span> <span style="color: #400080;">NSXMLDocument</span> alloc <span style="color: #002200;">&#93;</span> 
    initWithContentsOfURL<span style="color: #002200;">:</span> url
    options<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span> NSXMLNodePreserveWhitespace | NSXMLNodePreserveCDATA <span style="color: #002200;">&#41;</span>
    error<span style="color: #002200;">:</span> <span style="color: #002200;">&amp;</span>error <span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> <span style="color: #a61390;">nil</span> <span style="color: #002200;">!=</span> error <span style="color: #002200;">&#41;</span>
  <span style="color: #002200;">&#123;</span>
    NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@&quot;</span>, <span style="color: #002200;">&#91;</span> error localizedDescription <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>;
    <span style="color: #002200;">&#91;</span> pool drain <span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">0</span>;
  <span style="color: #002200;">&#125;</span>
&nbsp;
  <span style="color: #400080;">NSXMLNode</span><span style="color: #002200;">*</span> rootElement <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> xmlDocument rootElement <span style="color: #002200;">&#93;</span>;
  <span style="color: #400080;">NSArray</span><span style="color: #002200;">*</span> showrooms <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> rootElement children <span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #a61390;">int</span> i, count <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> showrooms count <span style="color: #002200;">&#93;</span>;
  <span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span> i <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>; i &lt; count; <span style="color: #002200;">++</span>i <span style="color: #002200;">&#41;</span> 
  <span style="color: #002200;">&#123;</span>
    <span style="color: #400080;">NSXMLNode</span><span style="color: #002200;">*</span> showroomNode <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> showrooms objectAtIndex<span style="color: #002200;">:</span> i <span style="color: #002200;">&#93;</span>;
    <span style="color: #400080;">NSXMLNode</span><span style="color: #002200;">*</span> nameNode <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> showroomNode childAtIndex<span style="color: #002200;">:</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #400080;">NSArray</span><span style="color: #002200;">*</span> nodes <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> showroomNode nodesForXPath<span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;phone_number&quot;</span> error<span style="color: #002200;">:</span> <span style="color: #a61390;">nil</span> <span style="color: #002200;">&#93;</span>;
    <span style="color: #400080;">NSXMLNode</span><span style="color: #002200;">*</span> phoneNumberNode <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> <span style="color: #2400d9;">1</span> <span style="color: #002200;">==</span> <span style="color: #002200;">&#91;</span> nodes count <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      phoneNumberNode <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span> nodes objectAtIndex<span style="color: #002200;">:</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@ (%@)&quot;</span>, <span style="color: #002200;">&#91;</span> nameNode stringValue <span style="color: #002200;">&#93;</span>, <span style="color: #002200;">&#91;</span> phoneNumberNode stringValue <span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span>;
  <span style="color: #002200;">&#125;</span>
&nbsp;
  <span style="color: #002200;">&#91;</span> xmlDocument release <span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span> url release <span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #002200;">&#91;</span> pool drain <span style="color: #002200;">&#93;</span>;
  <span style="color: #a61390;">return</span> <span style="color: #2400d9;">0</span>;
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

<p>예제에서 특별히 어려운 내용은 없습니다. <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSXMLDocument_Class/Reference/Reference.html">NSXMLDocument</a> 클래스가 HTTP를 지원하기 때문에 <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSXMLDocument_Class/Reference/Reference.html#//apple_ref/occ/instm/NSXMLDocument/initWithContentsOfURL:options:error:">initWithContentsOfURL</a> 메소드를 호출하기만 하면 됩니다. 그리고 아이폰 런타임 환경에서는 가비지 컬렉션이 지원되지 않기 때문에 <del datetime="2010-03-10T04:19:17+00:00"><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html">NSAutoreleasePool</a> 클래스를 이용해서 메모리 관리를 하였습니다.</del> </p>
<p>예제에서 3가지 다른 방법으로 자식 노드에 접근하고 있습니다. 각각 <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html#//apple_ref/occ/instm/NSXMLNode/children">children</a>, <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html#//apple_ref/occ/instm/NSXMLNode/childAtIndex:">objectAtIndex</a>, <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html#//apple_ref/occ/instm/NSXMLNode/nodesForXPath:error:">nodesForXPath</a> 메소드를 이용합니다. 가장 일반적인 방법은 nodesForXPath을 이용하는 방법입니다. 약간의 성능 문제가 있을 수도 있지만 대부분의 경우 처리하는 XML 데이터의 량이 많이 않기 때문에 신경 쓰지 않아도 될 듯 합니다. 반면 objectAtIndex 메소드를 사용하는 경우 성능은 향상될 수 있겠지만 XML 문법에 종속적이기 때문에 그리 권장할만한 방법은 아닙니다.</p>
<p>해당 파일을 컴파일하는 쉘 구문은 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-framework</span> Foundation hello.m <span style="color: #660033;">-o</span> hello</pre></div></div>

<p>실행 결과 화면은 아래와 같습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>hello
강남전시장 <span style="color: #7a0874; font-weight: bold;">&#40;</span>02-<span style="color: #000000;">111</span>-<span style="color: #000000;">1111</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
삼성전시장 <span style="color: #7a0874; font-weight: bold;">&#40;</span>02-<span style="color: #000000;">222</span>-<span style="color: #000000;">2222</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
한남전시장 <span style="color: #7a0874; font-weight: bold;">&#40;</span>02-<span style="color: #000000;">333</span>-<span style="color: #000000;">3333</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>프로그래밍에 도움되길 바랍니다~</p>
<p>[ 수정 사항 ]<br />
조사해 본 결과 NSXMLDocument 클래스는 iPhone SDK에 제외되어 있습니다. 따라서 위 예제는 OS X 애플리케이션에서만 동작합니다. <del datetime="2010-03-10T04:19:17+00:00">빠른 시일 내에 iPhone에서 돌아가는 예제를 작성해서 올리도록 하겠습니다.</del> iPhone은 <a href="http://kiipos.delimount.net/1084">iPhone, HTTP로 XML 데이터 요청 및 처리 예제</a>를 참고하세요~</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/8Zygle+OS+X%2C+HTTP%EB%A1%9C+XML+%EB%8D%B0%EC%9D%B4%ED%84%B0+%EC%9A%94%EC%B2%AD+%EC%98%88%EC%A0%9C+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/980&amp;title=OS+X%2C+HTTP%EB%A1%9C+XML+%EB%8D%B0%EC%9D%B4%ED%84%B0+%EC%9A%94%EC%B2%AD+%EC%98%88%EC%A0%9C" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/980/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>트위터 플러그인 설치했어요</title>
		<link>http://kiipos.delimount.net/919</link>
		<comments>http://kiipos.delimount.net/919#comments</comments>
		<pubDate>Sun, 17 Jan 2010 12:19:36 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[워드프레스]]></category>
		<category><![CDATA[트위터]]></category>
		<category><![CDATA[플러그인]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=919</guid>
		<description><![CDATA[요즘 트위터에 조금 익숙해진 것 같습니다. 아무래도 미투데이와 트위터를 동시에 사용하다보니 분산되긴 하지만 SNS 전체 활동량이 늘어났기 때문에 트위팅 시간도 많이 늘었습니다.  구독(follow)하는 사람들도 조금 늘었고 트윗 개수도 조금씩 늘어가고 있습니다.
몇일전 워드프레스를 2.9.1버전으로 업그레이드 했습니다. 저희 서버는 SFTP를 사용하기 때문에 자동 업그레이드가 실행이 안되서 다소 귀찮지만 수동으로 업그레이드 했습니다.  그나저나 처음에는 SFTP가 마냥 좋은 줄 알았는데 [...]]]></description>
			<content:encoded><![CDATA[<p>요즘 트위터에 조금 익숙해진 것 같습니다. 아무래도 <a href="http://me2day.net/kiipos">미투데이</a>와 <a href="http://twitter.com/kiipos">트위터</a>를 동시에 사용하다보니 분산되긴 하지만 SNS 전체 활동량이 늘어났기 때문에 트위팅 시간도 많이 늘었습니다.  구독(follow)하는 사람들도 조금 늘었고 트윗 개수도 조금씩 늘어가고 있습니다.</p>
<p>몇일전 워드프레스를 2.9.1버전으로 업그레이드 했습니다. 저희 서버는 SFTP를 사용하기 때문에 자동 업그레이드가 실행이 안되서 다소 귀찮지만 수동으로 업그레이드 했습니다.  그나저나 처음에는 SFTP가 마냥 좋은 줄 알았는데 <a href="http://www.digimoon.net/blog/321">몇가지 단점</a>도 있고해서 FTPS도 한번 고려해봐야 겠네요.</p>
<p>아무튼 워드프레스 업그레이드 하면서 트위터 플러그인도 몇가지 추가해봤습니다. 아무래도 블로그보다는 트위터에 포스팅을 많이 하기 때문에 포스팅이 빈한 블로그를 보완하기 위해 사이드바에 트위터 위젯을 추가했습니다. 처음에는 구글링의 가장 상단에 나오는 <a href="http://wordpress.org/extend/plugins/twitter-tools/">Twitter Tools</a>라는 플러그인을 설치했습니다. 그런데 기능이 너무 많고 무거워서 너무 무거운게 제 취향이 아니었습니다.</p>
<p>그래서 <a href="http://wordpress.org/extend/plugins/twitter-for-wordpress/">Twitter for Wordpress</a>를 설치했는데 기능도 단순하고 옵션도 적당해서 일단 제 마음에는 들었습니다. 하지만 처음 페이지를 렌더링할 때 다소 지연(delay)가 발생합니다. 아마도 트위터로부터 정보를 가져와서 캐싱하는데 시간이 좀 걸리는 것 같습니다. 일단 캐싱되면 빠르게 렌더링이 되지만 거슬려서 다른 플러그인을 찾아보았습니다.</p>
<p>결국 <a href="http://www.velvet.id.au/twitter-wordpress-sidebar-widget/">Twitter Wordpress Sidebar Widget</a>이라는 플러그인을 설치했습니다. Twitter for Wordpress보다는 옵션이 부족하지만 렌더링 시간이 거슬릴 정도는 아닙니다. 그런데 트윗한 시각을 &#8216;2 house ago&#8217; 형식으로 보여주는데 포스팅 시각이 그리 중요한 것 같지는 않아서 php 소스를 살짝 고쳐서 &#8216;#&#8217;로 표시되도록 했습니다.</p>
<p>트위터 위젯은 사이드바 가장 상단에 배치하였습니다. 아무래도 가장 업데이트가 자주 발생하는 정보인 만큼 우선순위를 가장 높였습니다.  그다음 최근 글, 태그, 월별 목록 순으로 위젯을 배치하였습니다. 블로그롤(링크 목록) 위젯은는 트위터 위젯과 다소 중복적으로 우선순위를 낮췄습니다.</p>
<p>그리고 <a href="http://richardxthripp.thripp.com/tweet-this">Tweet This</a>라는 플러그인도 설치했습니다. 이 플러그인을 설치하면 글 아래에 &#8216;Tweet this&#8217;라는 버튼이 표시됩니다. 이 버튼을 클릭하면 현재 보고 있을 글을 트위터로 포스팅할 수 있습니다. 그리고 제가 블로그에 포스팅하면 자동으로 트위터에 URL과 제목을 포스팅해주는 기능도 있습니다.</p>
<p>별건 아니지만 그래도 설치해놓고 보니 뭔가 작은 성취감을 느낄 수 있었습니다ㅎ. 당분간은 열심히 트위팅을 할 것 같습니다~</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/7NoCOe+%ED%8A%B8%EC%9C%84%ED%84%B0+%ED%94%8C%EB%9F%AC%EA%B7%B8%EC%9D%B8+%EC%84%A4%EC%B9%98%ED%96%88%EC%96%B4%EC%9A%94+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/919&amp;title=%ED%8A%B8%EC%9C%84%ED%84%B0+%ED%94%8C%EB%9F%AC%EA%B7%B8%EC%9D%B8+%EC%84%A4%EC%B9%98%ED%96%88%EC%96%B4%EC%9A%94" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/919/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>크롬, 글꼴 강제 지정하기 &#8211; 사용자 스타일 적용하기</title>
		<link>http://kiipos.delimount.net/819</link>
		<comments>http://kiipos.delimount.net/819#comments</comments>
		<pubDate>Mon, 04 Jan 2010 12:43:54 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[글꼴]]></category>
		<category><![CDATA[나눔고딕]]></category>
		<category><![CDATA[맑은고딕]]></category>
		<category><![CDATA[사용자스타일]]></category>
		<category><![CDATA[크롬]]></category>
		<category><![CDATA[폰트]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=819</guid>
		<description><![CDATA[제 블로그로 들어오는 여러 가지 경로 중 구글을 통해 들어오는 경우를 관심있게 보고 있습니다. 최근에 &#8216;크롬 맑은 고딕&#8217;이라는 키워드로 들어오는 경우가 제법 있었습니다. 아마도 크롬에 맑은고딕을 적용하는 방법을 찾는 사람이 아닐까라고 생각해봅니다.  저도 굴림이나 돋움에 너무 질려서 웬만하면 나눔고딕으로 보고 싶은데 크롬 3.0에는 글꼴 강제 지정 기능이 없어 많이 아쉬웠었습니다.
그런데 오늘 혹시나 하는 마음에 크롬 확장 [...]]]></description>
			<content:encoded><![CDATA[<p>제 블로그로 들어오는 여러 가지 경로 중 구글을 통해 들어오는 경우를 관심있게 보고 있습니다. 최근에 &#8216;크롬 맑은 고딕&#8217;이라는 키워드로 들어오는 경우가 제법 있었습니다. 아마도 크롬에 <strong>맑은고딕</strong>을 적용하는 방법을 찾는 사람이 아닐까라고 생각해봅니다.  저도 <a href="http://kiipos.delimount.net/489">굴림이나 돋움에 너무 질려서</a> 웬만하면 <strong>나눔고딕</strong>으로 보고 싶은데 크롬 3.0에는 글꼴 강제 지정 기능이 없어 많이 아쉬웠었습니다.</p>
<p>그런데 오늘 혹시나 하는 마음에 크롬 <a href="https://chrome.google.com/extensions?hl=ko">확장 프로그램(extension)</a>을 찾아보니 <a href="https://chrome.google.com/extensions/detail/bpbpmpkbnfajbeogbmhndhijpgkchaab">userContent</a>라는 확장 프로그램이 있었습니다. 내용을 대충 읽어보니 사용자가 지정한 CSS를 모든 웹 페이지에 적용하는 확장 프로그램인 듯해서 설치를 진행해봤습니다.</p>
<p>우선 2010년 1월 현재 안정 채널(stable channel, 크롬 프로젝트에서는 버전 대신 채널이라는 용어을 사용하고 있네요)은 버전 3.x으로 확장 프로그램 기능을 지원하지 않습니다.  그래서 <a href="http://dev.chromium.org/getting-involved/dev-channel">크롬 프로젝트 홈페이지</a>에 가보니 베타 채널과 개발 채널을 설치할 수 있더군요. 아무래도 베타 채널이 조금 더 안정적이기 때문에 <a href="http://www.google.com/chrome/eula.html?extra=betachannel">베타 채널을 설치</a>했는데 다행이 베타 채널(ver 4.0)은 확장 프로그램을 지원하더군요.</p>
<p>그리고 <a href="https://chrome.google.com/extensions/detail/bpbpmpkbnfajbeogbmhndhijpgkchaab">userContent</a> 확장 프로그램을 설치했습니다. 아직 사용자 CSS를 지정하지 않았기 때문에 웹 페이지를 열어도 아무런 변화가 없었습니다. &#8216;도구 메뉴 &gt; 확장 프로그램&#8217;을 선택하면 확장 프로그램 페이지가 열리고 userContent 항목의 옵션 버튼을 클릭하면 사용자 CSS 입력 페이지가 열립니다.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-family</span> <span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'나눔고딕'</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>편집 창에 위 내용을 입력한 후 저장합니다. 그러면 크롬으로 여는 모든 페이지에 나눔고딕이 적용됩니다. 당연한 얘기지만 PC에 나눔고딕이 설치되어 있어야 합니다.</p>
<p>CSS 구문을 간단하게 살펴보면 <strong>*</strong>는 전체 선택자(universal selector)이며 해당 구문은 모든 엘리먼트(element)에 나눔고딕을 글꼴로 적용해라는 내용입니다. (만약 맑은고딕을 적용하려면 &#8216;나눔고딕&#8217; 대신 &#8216;맑은 고딕&#8217;이라고 입력합니다.)  <strong><a href="http://www.w3.org/TR/CSS2/cascade.html#important-rules">!important</a></strong>는 사용자 스타일의 우선 순위를 높게 합니다. 기본적으로 제작자(author)가 지정한  스타일이 사용자 스타일보다 우선 순위가 높습니다. 그러나 !important가 선언된 스타일의 경우 사용자 스타일이 더 높은 우선 순위를 갖게됩니다. 그래서 제작자 지정한 글꼴은 무시되고 사용자 지정한 나눔고딕이 웹 페이지에 적용됩니다.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-family</span> <span style="color: #00AA00;">:</span> <span style="color: #993333;">sans-serif</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>사용자 스타일을 위에 내용으로 저장하면 브라우저에서 지정한 산세리프체 글꼴이 페이지에 적용됩니다. 이 방법은 사용자 지정 글꼴을 변경할 때 CSS 구분을 직접 편집하는 않고 브라우저가 지원하는 옵션 기능을 이용하기 때문에 CSS 문법에 익숙하지 않은 사용자들이 쉽게 사용할 수 있습니다. 사용자 지정 글꼴을 변경하려면 &#8216;기능 메뉴 &gt; 옵션 &gt; 고급설정 &gt; 언어와 글꼴&#8217;에서 변경할 수 있습니다.</p>
<p>파이어폭스도 좋은 브라우저이긴 하지만 개인적으로 빠른 랜더링과 UI의 간결함 때문에 크롬을 더 좋아합니다. 그러나 지금까지는 크롬에 글꼴을 강제하는 기능이 없어 파이어폭스를 메인 브라우저로 사용하고 있었습니다. 하지만 크롬 4.0부터는 사용자 스타일 지정할 수 있기 때문에 더이상 크롬을 메인 브라우저로 사용하지 않을 이유가 없습니다. 크롬 좋아요~!</p>
<p>[ 추가 사항 ]<br />
전체 선택자를 사용하는 경우 pre 엘리먼트에도 스타일이 적용됩니다. 그런데 pre 엘리먼트는 주로 프로그램 소스 코드를 출력할 때 사용되며 소스 코드는 고정폭 글꼴이 적용되는 것이 좋을 것 같아서 pre, code, samp 엘리먼트를 제외한 모든 <a href="http://www.w3.org/TR/html4/sgml/dtd.html#block">block 엘리먼트</a>와 <a href="http://www.w3.org/TR/html401/sgml/dtd.html#inline">inline 엘리먼트</a>에 적용되도록 수정하였습니다.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">p<span style="color: #00AA00;">,</span> h1<span style="color: #00AA00;">,</span> h2<span style="color: #00AA00;">,</span> h3<span style="color: #00AA00;">,</span> h4<span style="color: #00AA00;">,</span> h5<span style="color: #00AA00;">,</span> h6<span style="color: #00AA00;">,</span> ul<span style="color: #00AA00;">,</span> ol<span style="color: #00AA00;">,</span> dl<span style="color: #00AA00;">,</span> div<span style="color: #00AA00;">,</span> blockquote<span style="color: #00AA00;">,</span> form<span style="color: #00AA00;">,</span> hr<span style="color: #00AA00;">,</span> table<span style="color: #00AA00;">,</span> 
  fieldset<span style="color: #00AA00;">,</span> address<span style="color: #00AA00;">,</span> dt<span style="color: #00AA00;">,</span> dd<span style="color: #00AA00;">,</span> td<span style="color: #00AA00;">,</span>
  tt<span style="color: #00AA00;">,</span> i<span style="color: #00AA00;">,</span> b<span style="color: #00AA00;">,</span> big<span style="color: #00AA00;">,</span> small<span style="color: #00AA00;">,</span> em<span style="color: #00AA00;">,</span> string<span style="color: #00AA00;">,</span> dfn<span style="color: #00AA00;">,</span> kbd<span style="color: #00AA00;">,</span> var<span style="color: #00AA00;">,</span> cite<span style="color: #00AA00;">,</span> abbr<span style="color: #00AA00;">,</span> acronym<span style="color: #00AA00;">,</span> 
  a<span style="color: #00AA00;">,</span> q<span style="color: #00AA00;">,</span> sub<span style="color: #00AA00;">,</span> sup<span style="color: #00AA00;">,</span> span<span style="color: #00AA00;">,</span> bdo<span style="color: #00AA00;">,</span> input<span style="color: #00AA00;">,</span> select<span style="color: #00AA00;">,</span> textarea<span style="color: #00AA00;">,</span> label<span style="color: #00AA00;">,</span> button 
<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span> <span style="color: #00AA00;">:</span> <span style="color: #993333;">sans-serif</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/71Ts7k+%ED%81%AC%EB%A1%AC%2C+%EA%B8%80%EA%BC%B4+%EA%B0%95%EC%A0%9C+%EC%A7%80%EC%A0%95%ED%95%98%EA%B8%B0+%E2%80%93+%EC%82%AC%EC%9A%A9%EC%9E%90+%EC%8A%A4%ED%83%80%EC%9D%BC+%EC%A0%81%EC%9A%A9%ED%95%98%EA%B8%B0+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/819&amp;title=%ED%81%AC%EB%A1%AC%2C+%EA%B8%80%EA%BC%B4+%EA%B0%95%EC%A0%9C+%EC%A7%80%EC%A0%95%ED%95%98%EA%B8%B0+%E2%80%93+%EC%82%AC%EC%9A%A9%EC%9E%90+%EC%8A%A4%ED%83%80%EC%9D%BC+%EC%A0%81%EC%9A%A9%ED%95%98%EA%B8%B0" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/819/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RESTful한 URI(URL) 만들기</title>
		<link>http://kiipos.delimount.net/664</link>
		<comments>http://kiipos.delimount.net/664#comments</comments>
		<pubDate>Thu, 03 Dec 2009 07:23:54 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[restful]]></category>
		<category><![CDATA[uri]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[레일스]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=664</guid>
		<description><![CDATA[최근 관심을 갖고 틈틈히 공부하고 있는 것이 REST(Representational State Transfer)입니다. REST는 아키텍처 스타일이라고 할 수 있는데 레일스 2에서 REST를 처음 접하게 되었습니다. 아키텍처 레벨은 REST를 기반으로 구현 레벨은 MVC로 설계가 잡히면서 프레임웍이 훨씬 더 짜임새 있어 보였습니다.
좁은 의미에서 REST는 ROA(Resource-Oriented Architecture)라고 볼 수 있습니다. 마치 객체 지향에서 모든 것을 객체(클래스)로 정의하 듯이 ROA에서는 서비스내에 의미를 [...]]]></description>
			<content:encoded><![CDATA[<p>최근 관심을 갖고 틈틈히 공부하고 있는 것이 <a href="http://ko.wikipedia.org/wiki/REST">REST(Representational State Transfer)</a>입니다. REST는 아키텍처 스타일이라고 할 수 있는데 레일스 2에서 REST를 처음 접하게 되었습니다. 아키텍처 레벨은 REST를 기반으로 구현 레벨은 MVC로 설계가 잡히면서 프레임웍이 훨씬 더 짜임새 있어 보였습니다.</p>
<p>좁은 의미에서 REST는 ROA(Resource-Oriented Architecture)라고 볼 수 있습니다. 마치 객체 지향에서 모든 것을 객체(클래스)로 정의하 듯이 ROA에서는 서비스내에 의미를 가질만한 요소들을 리소스(resource) 단위로 정의합니다. 그리고 리소스가 의미를 가지기 위해서는 리소스의 이름이 필요하며 그 이름을 URI라고 합니다. 참고로 URI와 URL은 같은 걸로 보면됩니다.</p>
<p>그런데 리소스만으로는 서비스의 모든 URI를 표현할 수 없습니다. 모든 내용이 그 내용을 보여주는 형식을 필요로 하듯이 리소스도 리소스를 보여주는 형식이 필요합니다. 리소스를 보여주는 형식을 리프리젠테이션스(representaions)라고 합니다. 그리고 URI는 리소스와 리프리젠테이션의 조합으로 만들어집니다. 예를 들어 레일스에서 아래와 같은 URI 관례가 있습니다.</p>
<ul>
<li>/orders</li>
<li>/orders/1</li>
<li>/orders/new</li>
<li>/orders/1/edit</li>
</ul>
<p>&#8216;/orders&#8217;과 &#8216;/orders/1&#8242;처럼 리소스만으로 표현된 URI가 있는가 하면 &#8216;/orders/new&#8217;와 &#8216;/orders/1/edit&#8217;처럼 리소스와 리프리젠테이션이 조합으로 구성된 URI도 있습니다.</p>
<p>일반적으로 리소스를 대상으로 할 수 있는 기본적인 조작(operation)은 몇가지 정해져 있습니다. 흔히 이것들을 CRUD(Create, Read, Update, Delete)라고 하며 레일스에서 정해놓은 CRUD 관련 URI는 아래와 같습니다.</p>
<ul>
<li><strong>List</strong> : GET /orders</li>
<li><strong>Create Form</strong> : GET /orders/new</li>
<li><strong>Create</strong> : POST /orders</li>
<li><strong>Read</strong> : GET /orders/1</li>
<li><strong>Update Form</strong> : GET /orders/1/edit</li>
<li><strong>Update</strong> : PUT /orders/1</li>
<li><strong>Delete</strong> : DELETE /orders/1</li>
</ul>
<p>여기서 주목할만 것은 Create, Update, Delete의 경우 별도의 URI를 갖지 않으며 리소스 URI를 요청하는 방식(method)를 달리 가져갔다는 점입니다. 리소스를 GET으로 요청하면 해당 리소스의 리프리젠테이션을 기대하게 되며 리소스를 POST로 요청하면 해당 새로운 리소스를 추가합니다. 마찬가지로 리소스를 PUT으로 요청하면 해당 리소스를 수정하는 것이며 DELETE 방식으로 요청하면 삭제하는 것을 의미합니다.</p>
<p>이러한 기본 규칙을 통해서 URI는 통일성을 가지게 됩니다. 그리고 이 통일성을 좁은 의미에서 RESTful이라 할 수 있습니다. 나아가 이러한 통일성은 개발 효율로 이어집니다. 새로운 서비스의 API를 접할 때 그 서비스가 RESTful하다면 URI의 기본 규칙이 동일하기 때문에 API 학습량이 줄어들기 때문입니다. 아마도 이러한 점이 관례를 중시하는 레일스가 적극적으로 REST를 도입한 이유가 아닐까 싶습니다.</p>
<p>그런데 서비스 기능 중에는 기본적으로 정의된 CRUD 이외의 것들이 있을 수 있습니다. 예를 들어, 단순하게 주문 목록을 보여주는 기능을 List라 하고 목록과 달리 주문과 주문 품목을 함께 보여주는 기능을 Inquiry라고 정합니다. 이때 Inquiry 리프리젠테이션의 URI는 아래와 같이 2가지로 생각해볼 수 있습니다.</p>
<ul>
<li>GET /orders?view=inquiry</li>
<li>GET /orders/inquiry</li>
</ul>
<p>앞에 것은 쿼리스트링에 리프리젠테이션(view) 정보를 넘기는 경우이며 뒤에 것은 URI에 리프리젠테이션을 명시한 경우입니다. 사실 어느 것으로 하던 상관은 없다고 봅니다. 다만 앞의 것의 경우 List와 Inquiry가 동일하게 주문 목록을 보여준다는 쪽에 무게를 실은 반면에 뒤에 것은 둘이 서로 다른 리프젠테이션이라는 것을 조금 더 명시적으로 표시한 것입니다. 저희 팀의 경우 뒤에 방식을 선택했는데 사용자들이 보기에 List과 Inquiry은 서로 다른 페이지라고 느낄 것이라고 판단했기 때문입니다.</p>
<p>지금까지 REST를 공부하면서 익혔던 것들을 정리해보았습니다. 참고로 <a href="http://book.naver.com/bookdb/book_detail.php?bid=2909069">RESTful Web Services</a>을 보고 있는데 아직 중간 쯤 읽은 상태라 정리한 내용 중에 틀린 부분이 있을 수도 있으니 기회가 되면 덧글 좀 남겨주세요~</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/7ygfK8+RESTful%ED%95%9C+URI%28URL%29+%EB%A7%8C%EB%93%A4%EA%B8%B0+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/664&amp;title=RESTful%ED%95%9C+URI%28URL%29+%EB%A7%8C%EB%93%A4%EA%B8%B0" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/664/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>윈도우즈 7, 아직은 조금 이른가?</title>
		<link>http://kiipos.delimount.net/649</link>
		<comments>http://kiipos.delimount.net/649#comments</comments>
		<pubDate>Tue, 17 Nov 2009 06:48:41 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[윈도우즈7]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=649</guid>
		<description><![CDATA[집에서 사용하는 PC의 메인보드가 고장나서 A/S 받았는데 내친 김에 윈도우즈 7을 설치해봤습니다. 설치 시간이 XP보다는 오래 걸린 듯 하지만 큰 무리없이 설치되었습니다. 전체적인 UI는 XP랑 크게 다르지 않아서 사용 상에 어려움은 거의 없었습니다. 부팅 시간도 제법 빠른 편이며 종료는 XP보다 빠른 듯 했습니다. 스타일은 XP보다는 비스타에 가까웠으며 맑은 고딕이 기본 시스템 글꼴이라 훨씬 세련되어 보였습니다.
원래 [...]]]></description>
			<content:encoded><![CDATA[<p>집에서 사용하는 PC의 메인보드가 고장나서 A/S 받았는데 내친 김에 윈도우즈 7을 설치해봤습니다. 설치 시간이 XP보다는 오래 걸린 듯 하지만 큰 무리없이 설치되었습니다. 전체적인 UI는 XP랑 크게 다르지 않아서 사용 상에 어려움은 거의 없었습니다. 부팅 시간도 제법 빠른 편이며 종료는 XP보다 빠른 듯 했습니다. 스타일은 XP보다는 비스타에 가까웠으며 맑은 고딕이 기본 시스템 글꼴이라 훨씬 세련되어 보였습니다.</p>
<p>원래 파이어폭스와 크롬을 사용하기 때문에 웹 서핑에 큰 어려움은 없었습니다. 그러나 국민은행 인터넷 뱅킹은 정상적으로 진행할 수 없었습니다(ActiveX 정말 싫다). 그런데 메인보드 포함된 사운드 장치의 드라이버가 정상적으로 설치되지 않았습니다. ASUS 홈페이지에 가봤지만 윈도우즈 7용 드라이버는 없었습니다. 사운드 장치가 비정상적이라 게임을 설치도 해보지 않았습니다.</p>
<p>XP보다 스타일이 좋고 성능도 나쁘지 않아서 윈도우즈 7으로 넘어갈까 했지만 아직은 이른 듯 합니다. 결국 XP 다시 깔아야겠습니다.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/8P7tV1+%EC%9C%88%EB%8F%84%EC%9A%B0%EC%A6%88+7%2C+%EC%95%84%EC%A7%81%EC%9D%80+%EC%A1%B0%EA%B8%88+%EC%9D%B4%EB%A5%B8%EA%B0%80%3F+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/649&amp;title=%EC%9C%88%EB%8F%84%EC%9A%B0%EC%A6%88+7%2C+%EC%95%84%EC%A7%81%EC%9D%80+%EC%A1%B0%EA%B8%88+%EC%9D%B4%EB%A5%B8%EA%B0%80%3F" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/649/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>맥으로 고고~</title>
		<link>http://kiipos.delimount.net/607</link>
		<comments>http://kiipos.delimount.net/607#comments</comments>
		<pubDate>Wed, 14 Oct 2009 06:40:22 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[맥]]></category>
		<category><![CDATA[아이폰]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=607</guid>
		<description><![CDATA[출퇴근할 때 전철에서 음악을 즐겨 듣는데 지금 쓰는 mp3 플레이어도 나름 괜찮지만 요즘 들어 부쩍 아이팟 터치가 갖고 싶다는 생각이 많이 들었습니다. 게다가 곧 아이폰도 출시될 예정이라 자연스럽게 아이폰 애플리케이션에 많은 관심이 생겼습니다. 그러다가 아이팟을 사는 김에 아이폰 애플리케이션을 개발해서 돈도 벌면 좋겠다는 생각까지 하게 되었습니다ㅎ.
생각난 김에 웹을 뒤지기 시작했습니다. 그 과정에서 알게된 흥미로운 사실은 [...]]]></description>
			<content:encoded><![CDATA[<p>출퇴근할 때 전철에서 음악을 즐겨 듣는데 지금 쓰는 mp3 플레이어도 나름 괜찮지만 요즘 들어 부쩍 아이팟 터치가 갖고 싶다는 생각이 많이 들었습니다. 게다가 곧 아이폰도 출시될 예정이라 자연스럽게 아이폰 애플리케이션에 많은 관심이 생겼습니다. 그러다가 아이팟을 사는 김에 아이폰 애플리케이션을 개발해서 돈도 벌면 좋겠다는 생각까지 하게 되었습니다ㅎ.</p>
<p>생각난 김에 웹을 뒤지기 시작했습니다. 그 과정에서 알게된 흥미로운 사실은 아이폰(아이팟 터치)에서 돌아가는 애플리케이션을 개발하기 위해서는 맥이 필요하다는 것입니다. 애플의 자신감일까요? 아님 비용 문제일까요? 물론 맥 없이도 가능한 것도 같지만 굳이 그 험난한 길을 가고 싶지 않습니다;;;</p>
<p>하는 수 없이 맥을 구입하려고 알아보니 가장 저렴한 시스템은 맥미니더군요. 비용 절감 차원에서 중고 제품을 알아봤는데 저랑 같은 생각을 한 사람들이 많은 가 봅니다. 맥미니 매물은 올라오자 말자 예약되어버리더군요. 참고로 파워맥에서는 아이폰 애플리케이션을 개발할 수 없는 걸로 알고 있습니다. 저도 몇번 알아보다가 지금은 포기하고 새제품을 구입할 예정입니다.</p>
<p>맥미니를 구입하는 동안 가만히 있을 수만은 없어 Objective-C 공부를 시작했습니다. Objective-C는 아이폰 애플리케이션을 개발할 때 사용하는 언어로 C 기반의 객체지향 언어입니다. <a href="http://khie74.tistory.com/1169521335">윈도우즈에서도 Objective-C를 이용할</a> 수 있어 그 문법 정도는 익힐 수 있었습니다. Objective-C는 C 언어 위에 객체 지향 코드를 임베딩(embedding) 시켜 놓은 느낌이었습니다. 개념 상으로는 조금 다르지만 html 소스에 php나 루비 코드를 박아서 사용하는 것과 유사했습니다.</p>
<p>아무튼 오늘 맥미니를 주문할 예정입니다. 맥유저가된다고 생각하닌 왠지&#8230; 뭔가 있어보이네요ㅎ.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/811DX0+%EB%A7%A5%EC%9C%BC%EB%A1%9C+%EA%B3%A0%EA%B3%A0%7E+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/607&amp;title=%EB%A7%A5%EC%9C%BC%EB%A1%9C+%EA%B3%A0%EA%B3%A0%7E" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/607/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PNG, 아직은 그림의 떡</title>
		<link>http://kiipos.delimount.net/582</link>
		<comments>http://kiipos.delimount.net/582#comments</comments>
		<pubDate>Fri, 18 Sep 2009 07:56:52 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[png]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=582</guid>
		<description><![CDATA[이번에 홈페이지 작업하면서 PNG 포맷에 대해서 조금 알게되었습니다. PNG의 가장 큰 장점은 반투명을 지원하는 것입니다. GIF의 경우 투명이냐 아니냐만 표현할 수 있지만 PNG는 알파 값에 따라 투명의 정도가 표현됩니다. 또한 PNG는 무손실 압축이기 때문에 JPEG과 달리 잡티(열화)가 없습니다. 게다가 압축률도 좋아서 동일한 조건에서 다른 포맷보다 파일 크기가 작습니다.
그래서 이번 홈페이지를 개발할 때에는 PNG 파일을 이용해서 [...]]]></description>
			<content:encoded><![CDATA[<p>이번에 <a href="http://kiipos.delimount.net/529">홈페이지 작업</a>하면서 <a href="http://ko.wikipedia.org/wiki/PNG">PNG 포맷</a>에 대해서 조금 알게되었습니다. PNG의 가장 큰 장점은 반투명을 지원하는 것입니다. GIF의 경우 투명이냐 아니냐만 표현할 수 있지만 PNG는 알파 값에 따라 투명의 정도가 표현됩니다. 또한 PNG는 무손실 압축이기 때문에 JPEG과 달리 잡티(열화)가 없습니다. 게다가 압축률도 좋아서 동일한 조건에서 다른 포맷보다 파일 크기가 작습니다.</p>
<p>그래서 이번 홈페이지를 개발할 때에는 PNG 파일을 이용해서 작업을 진행했습니다. 그런데 작업이 진행되어 감에 따라 몇가지 문제가 발생했습니다.</p>
<p>우선 IE 6에서는 투명을 처리하지 못합니다. IE 6에서 투명 픽셀이 회색으로 표현됩니다. 그리고 IE는 다른 브라우저(파이어폭스, 크롬)와 달리 PNG 파일에서 색상 차이가 났습니다. 이는 <a href="http://minicube.kr/blog/89">IE가 PNG의 감마값을 제대로 처리하지 못해서 생기는 문제</a>라고 합니다.</p>
<p>IE 6 투명 문제는 작업 전에도 알고 있었기 때문에 어느 정도 각오를 했었지만 색상 차이 문제는 저도 처음 알았습니다. 결국 IE를 지원하기 위해서 몇몇 PNG 파일을 JPEG 파일로 교체해야 했습니다. 중간중간 IE 핵도 섰구요&#8230;</p>
<p>IE의 점유율이 매우 높이 현재의 시장 상황에서 IE를 지원해야하는 웹 서비스에의 경우 PNG로 구현하는 것은 무리가 있습니다. <a href="http://minicube.kr/blog/89">GIF를 어느 정도 대체할 수 있는 있겠지만</a> 256색 이상 필요한 이미지는 JPEG로 갈 수 밖에 없을 듯 합니다. 그런데 웹 서비스의 경우 우선은 성능보다 개발 생산성이 더 중요한 경우가 많기 때문에 그냥 전부 대부분 JPEG로 구현하는 것이 현실적이라고 생각합니다.</p>
<p>결국 PNG는 아직까지 그림의 떡일 수 밖에 없네요&#8230;</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/7KjkIO+PNG%2C+%EC%95%84%EC%A7%81%EC%9D%80+%EA%B7%B8%EB%A6%BC%EC%9D%98+%EB%96%A1+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/582&amp;title=PNG%2C+%EC%95%84%EC%A7%81%EC%9D%80+%EA%B7%B8%EB%A6%BC%EC%9D%98+%EB%96%A1" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/582/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>크롬 3.0</title>
		<link>http://kiipos.delimount.net/572</link>
		<comments>http://kiipos.delimount.net/572#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:30:46 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[크롬]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=572</guid>
		<description><![CDATA[크롬 3.0이 릴리즈되었습니다. 더 빨라졌네요. 게다가 여러가지 테마도 지원하네요. Brushed 테마도 괜찮긴 하지만 개인적으로 기본 테마가 제일 마음에 드네요 ㅎ.
하지만 언급된 사용자 글꼴 강제 지정 기능은 아직 구현이 되지 않았네요. 개인적으로 크롬의 속도나 UI가 마음에 들지만 글꼴 강제 지정 기능이 구현되지 않아서 메인 브라우저로 사용하지 않고 있습니다. 혹시나 해서 개발자 버전을 설치해봤는데 아직 구현이 되지 [...]]]></description>
			<content:encoded><![CDATA[<p>크롬 3.0이 릴리즈되었습니다. <a href="http://choboweb.com/1201">더 빨라졌네요</a>. 게다가 <a href="https://tools.google.com/chrome/intl/en/themes/index.html">여러가지 테마</a>도 지원하네요. <a href="https://tools.google.com/chrome/intl/en/themes/theme_brushed.html">Brushed 테마</a>도 괜찮긴 하지만 개인적으로 기본 테마가 제일 마음에 드네요 ㅎ.</p>
<p>하지만 <a href="http://groups.google.com/group/google-kr-Chrome/tree/browse_frm/thread/fb23df2d046b3c19/518b2f236e279eeb?_done=%2Fgroup%2Fgoogle-kr-Chrome%2Fbrowse_frm%2Fthread%2Ffb23df2d046b3c19%2F518b2f236e279eeb%3Ftvc%3D1%26&amp;tvc=1">언급된 사용자 글꼴 강제 지정 기능</a>은 아직 구현이 되지 않았네요. 개인적으로 크롬의 속도나 UI가 마음에 들지만 글꼴 강제 지정 기능이 구현되지 않아서 메인 브라우저로 사용하지 않고 있습니다. 혹시나 해서 <a href="http://sites.google.com/a/chromium.org/dev/">개발자 버전</a>을 설치해봤는데 아직 구현이 되지 않았네요.</p>
<p>개발자 버전 설치하면서 알게되었는데 개발자 버전에는 <a href="http://code.google.com/chrome/extensions/index.html">Extension</a>이 구현되어 있네요. 크롬도 점점 쓸만해지네요. 글꼴 강제 지정만 구현되면 애용해줄텐데&#8230;</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/7W2nUn+%ED%81%AC%EB%A1%AC+3.0+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/572&amp;title=%ED%81%AC%EB%A1%AC+3.0" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/572/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>회사 홈페이지 만들었습니다~</title>
		<link>http://kiipos.delimount.net/529</link>
		<comments>http://kiipos.delimount.net/529#comments</comments>
		<pubDate>Thu, 10 Sep 2009 09:10:03 +0000</pubDate>
		<dc:creator>키포스</dc:creator>
				<category><![CDATA[미분류]]></category>
		<category><![CDATA[나눔고딕]]></category>
		<category><![CDATA[델리]]></category>
		<category><![CDATA[메타블로그]]></category>

		<guid isPermaLink="false">http://kiipos.delimount.net/?p=529</guid>
		<description><![CDATA[회사 홈페이지 만들었습니다. 지금까지는 그냥 블로그로 운영해왔는데 이번에 새로 하나 만들었습니다. 홈페이지의 가장 핵심적인 기능은 메타블로그입니다. 멤버들의 블로그에 게시된 글을 수집해서 보여줍니다. 회사 홈페이지라는 것이 한번 만들 놓으면 거의 방치되는 경향이 있기 때문에 초기에 생각했던 데로 회사 홈페이지가 메타블로그의 형태가 되도록 서비스 컨셉을 잡았습니다.
메타블로그라곤 하지만 아주 간단하게 구현했습니다. 일단 글 수집은 관리툴에서 수동으로 합니다. 일정 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.delimount.com/">회사 홈페이지</a> 만들었습니다. 지금까지는 그냥 <a href="http://oldblog.delimount.net/">블로그</a>로 운영해왔는데 이번에 새로 하나 만들었습니다. 홈페이지의 가장 핵심적인 기능은 <a href="http://www.delimount.com/articles">메타블로그</a>입니다. <a href="http://www.delimount.com/company/members">멤버</a>들의 블로그에 게시된 글을 수집해서 보여줍니다. 회사 홈페이지라는 것이 한번 만들 놓으면 거의 방치되는 경향이 있기 때문에 <a href="http://kiipos.delimount.net/4">초기에 생각했던</a> 데로 회사 홈페이지가 메타블로그의 형태가 되도록 서비스 컨셉을 잡았습니다.</p>
<p>메타블로그라곤 하지만 아주 간단하게 구현했습니다. 일단 글 수집은 관리툴에서 수동으로 합니다. 일정 시간 간격으로 수집할 수도 있지만 그리 자주 글을 쓰는 편이 아니라서 수동 수집만으로 충분할 것 같습니다. 나중에 필요해지면 그때 구현해도 늦지 않을 듯 합니다. 애자일스럽게~</p>
<p>그리고 각각의 블로그에서 피드 발행 시 글 전체가 공개되도록 설정하였습니다. 그러면 별도의 html 파서(parser) 없이 rss의 xml만으로 간단하게 글을 수집할 수 있기 때문입니다. 그리고 오래 전에 발행된 글의 수집은 초기 한번 피드 발행 글의 갯수를 전체 글의 개수 이상으로 해서 수집한 후 원래 설정으로 돌려놓았습니다.</p>
<p><a href="http://www.delimount.com/">홈 페이지</a>의 공지 글은 태그를 이용하였습니다. 블로그에서 글을 작성할 때 &#8216;<strong>델리</strong>&#8216;라는 태그를 추가하면 수집할 때 델리(공지) 카테고리에 추가되도록 구현하였습니다.</p>
<p>웹디자인은 <a href="http://www.templateworld.com/">Templateworld</a>의 <a href="http://demo.templateworld.com/zero/in_action/genius_web/index.html">템플릿</a>을 참고해서 저희 회사 컨셉에 맞게 수정하였습니다. 웹디자인이 단순하기 때문에 글꼴이 디자인에서 큰 비중을 차지합니다. 그래서 기본적으로 나눔고딕으로 렌더링되도록 설정되어 있으면 원하지 않는 경우 글꼴 지정을 해제할 수 있도록 하였습니다.</p>
<p>레일스(v2.3.2)로 개발하였으며 모든 HTML 페이지는 웹표준을 준수하도록 작성하였습니다. 총 개발 기간은 대략 2주 정도 소요되었습니다.</p>
<p>회사 설립 이래 처음으로 제대로 된 홈페이지가 생겼네요. 뭔가 뿌듯합니다~</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=http://bit.ly/75Copf+%ED%9A%8C%EC%82%AC+%ED%99%88%ED%8E%98%EC%9D%B4%EC%A7%80+%EB%A7%8C%EB%93%A4%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4%7E+" title="Post to Twitter"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://kiipos.delimount.net/529&amp;title=%ED%9A%8C%EC%82%AC+%ED%99%88%ED%8E%98%EC%9D%B4%EC%A7%80+%EB%A7%8C%EB%93%A4%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4%7E" title="Post to Delicious"><img class="nothumb" src="http://kiipos.delimount.net/wp-content/plugins/tweet-this/icons/tt-delicious-micro4.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://kiipos.delimount.net/529/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
