cvs: phpdoc-kr / bookinfo.xml extensions.ent language-defs.ent make_chm_index.html /faq general.xml /reference/apache reference.xml
/reference/array constants.xml reference.xml /reference/bc reference.xml /reference/bzip2 reference.xml /reference/calendar reference.xml
/reference/classobj reference.xml /reference/datetime reference.xml /reference/dir constants.xml reference.xml /reference/filesystem constants.xml
reference.xml /reference/http reference.xml /reference/iconv constants.xml reference.xml /reference/imap reference.xml /reference/info
constants.xml reference.xml /reference/mail reference.xml /reference/math constants.xml reference.xml /reference/mysql constants.xml reference.xml
/reference/network reference.xml /reference/oci8 reference.xml /reference/outcontrol reference.xml /reference/pcre constants.xml reference.xml
/reference/pdo constants.xml /reference/pgsql constants.xml reference.xml /reference/simplexml book.xml configure.! xml examples.xml setup.xml
/reference/strings constants.xml reference.xml /reference/url reference.xml /reference/var reference.xml /reference/xml constants.xml reference.xml
/reference/zlib constants.xml reference.xml

From: Date: Fri, 28 Mar 2008 17:55:01 +0000
Subject: cvs: phpdoc-kr / bookinfo.xml extensions.ent language-defs.ent make_chm_index.html /faq general.xml /reference/apache reference.xml
/reference/array constants.xml reference.xml /reference/bc reference.xml /reference/bzip2 reference.xml /reference/calendar reference.xml
/reference/classobj reference.xml /reference/datetime reference.xml /reference/dir constants.xml reference.xml /reference/filesystem constants.xml
reference.xml /reference/http reference.xml /reference/iconv constants.xml reference.xml /reference/imap reference.xml /reference/info
constants.xml reference.xml /reference/mail reference.xml /reference/math constants.xml reference.xml /reference/mysql constants.xml reference.xml
/reference/network reference.xml /reference/oci8 reference.xml /reference/outcontrol reference.xml /reference/pcre constants.xml reference.xml
/reference/pdo constants.xml /reference/pgsql constants.xml reference.xml /reference/simplexml book.xml configure.! xml examples.xml setup.xml
/reference/strings constants.xml reference.xml /reference/url reference.xml /reference/var reference.xml /reference/xml constants.xml reference.xml
/reference/zlib constants.xml reference.xml
Groups: php.doc.kr 
Request: Send a blank email to doc-kr+get-732@lists.php.net to get a copy of this message
progcom Fri Mar 28 17:55:01 2008 UTC Added files: /phpdoc-kr/reference/simplexml book.xml configure.xml examples.xml setup.xml Removed files: /phpdoc-kr/reference/apache reference.xml /phpdoc-kr/reference/array reference.xml /phpdoc-kr/reference/bc reference.xml /phpdoc-kr/reference/bzip2 reference.xml /phpdoc-kr/reference/calendar reference.xml /phpdoc-kr/reference/classobj reference.xml /phpdoc-kr/reference/datetime reference.xml /phpdoc-kr/reference/dir constants.xml reference.xml /phpdoc-kr/reference/filesystem constants.xml reference.xml /phpdoc-kr/reference/http reference.xml /phpdoc-kr/reference/iconv constants.xml reference.xml /phpdoc-kr/reference/imap reference.xml /phpdoc-kr/reference/info constants.xml reference.xml /phpdoc-kr/reference/mail reference.xml /phpdoc-kr/reference/math constants.xml reference.xml /phpdoc-kr/reference/mysql constants.xml reference.xml /phpdoc-kr/reference/network reference.xml /phpdoc-kr/reference/oci8 reference.xml /phpdoc-kr/reference/outcontrol reference.xml /phpdoc-kr/reference/pcre constants.xml reference.xml /phpdoc-kr/reference/pdo constants.xml /phpdoc-kr/reference/pgsql constants.xml reference.xml /phpdoc-kr/reference/strings constants.xml reference.xml /phpdoc-kr/reference/url reference.xml /phpdoc-kr/reference/var reference.xml /phpdoc-kr/reference/xml constants.xml reference.xml /phpdoc-kr/reference/zlib constants.xml reference.xml Modified files: /phpdoc-kr bookinfo.xml extensions.ent language-defs.ent make_chm_index.html /phpdoc-kr/faq general.xml /phpdoc-kr/reference/array constants.xml Log: update for pass test_xml

http://cvs.php.net/viewvc.cgi/phpdoc-kr/bookinfo.xml?r1=1.44&r2=1.45&diff_format=u Index: phpdoc-kr/bookinfo.xml diff -u phpdoc-kr/bookinfo.xml:1.44 phpdoc-kr/bookinfo.xml:1.45 --- phpdoc-kr/bookinfo.xml:1.44 Mon Jun 25 17:10:36 2007 +++ phpdoc-kr/bookinfo.xml Fri Mar 28 17:54:59 2008 @@ -1,21 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.52 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.54 Maintainer: progcom Status: ready --> <info xmlns="http://docbook.org/ns/docbook" xml:id="bookinfo"> - <title>&PHPManual;</title> &frontpage.authors; <pubdate>&php.build-date;</pubdate> &frontpage.editors; <copyright> - <year>1997-2007</year> + <year>1997-2008</year> <holder>the PHP Documentation Group (PHP 문서 그룹)</holder> </copyright> <legalnotice xml:id="copyright" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>저작권</title> <simpara> - Copyright &copy; 1997 - 2007 by the PHP Documentation Group. + Copyright &copy; 1997 - 2008 by the PHP Documentation Group. 이 저작물은 Open Publication License v1.0 이상의 조항 및 제약에 따를 경우에 재배포할 수 있습니다. <link linkend="opl.license">Open Publication License</link>는 이 매뉴얼에 포함되어 있으며, 최신 버전은 <link http://cvs.php.net/viewvc.cgi/phpdoc-kr/extensions.ent?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/extensions.ent diff -u phpdoc-kr/extensions.ent:1.4 phpdoc-kr/extensions.ent:1.5 --- phpdoc-kr/extensions.ent:1.4 Mon Jun 25 06:38:22 2007 +++ phpdoc-kr/extensions.ent Fri Mar 28 17:54:59 2008 @@ -1,4 +1,4 @@ -<!-- EN-Revision: 1.2 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: progcom Status: ready --> <!-- Entities for the categorized extension list, so it does not need http://cvs.php.net/viewvc.cgi/phpdoc-kr/language-defs.ent?r1=1.25&r2=1.26&diff_format=u Index: phpdoc-kr/language-defs.ent diff -u phpdoc-kr/language-defs.ent:1.25 phpdoc-kr/language-defs.ent:1.26 --- phpdoc-kr/language-defs.ent:1.25 Mon Aug 6 23:22:29 2007 +++ phpdoc-kr/language-defs.ent Fri Mar 28 17:54:59 2008 @@ -1,4 +1,4 @@ -<!-- EN-Revision: 1.32 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.37 Maintainer: progcom Status: ready --> <!-- Part title used mostly in manual.xml itself --> <!ENTITY PHPManual "PHP 매뉴얼"> @@ -10,6 +10,34 @@ <!ENTITY Features "기능"> <!ENTITY Security "보안"> <!ENTITY FunctionReference "함수 레퍼런스"> +<!ENTITY VariableandTypeRelatedExtentions "변수와 형 관련 확장"> +<!ENTITY TextProcessing "텍스트 처리"> +<!ENTITY AffectionPHPsBehaviour "PHP 동작에 미치는 영향"> +<!ENTITY SessionExtensions "세션 확장"> +<!ENTITY OtherBasicExtensions "기타 기본 확장"> +<!ENTITY DatabaseExtentions "데이터베이스 확장"> +<!ENTITY AbstractionLayers "추상 레이어"> +<!ENTITY VendorSpecificDatabaseExtensions "특정 벤더 데이터베이스 확장"> +<!ENTITY XMLManipulation "XML 조작"> +<!ENTITY WebServices "웹 서비스"> +<!ENTITY CreditCardProcessing "신용카드 처리"> +<!ENTITY MathematicalExtentions "수학 확장"> +<!ENTITY CryptographyExtentions "암호화 확장"> +<!ENTITY HumanLanguageandCharacterEncodingSupport "자연어와 문자 인코딩 지원"> +<!ENTITY FileSystemRelatedExtensions "파일 시스템 관련 확장"> +<!ENTITY ProcessControlExtentions "프로세스 관리 확장"> +<!ENTITY MailRelatedExtentions "메일 관련 확장"> +<!ENTITY AuthenticationServices "인증 서비스"> +<!ENTITY OtherServices "기타 서비스"> +<!ENTITY CompressionExtentions "압축 확장"> +<!ENTITY CalendarandEventRelatedExtentions "달력과 이벤트 관련 확장"> +<!ENTITY NonTextMIMEOutput "비텍스트 MIME 출력"> +<!ENTITY ImageProcessingandGeneration "이미지 처리와 생성"> +<!ENTITY AudioFormatsManipulation "오디오 형식 조작"> +<!ENTITY CommandLineSpecificExtentions "명령줄 특정 확장"> +<!ENTITY WindowsOnlyExtentions "윈도우 전용 확장"> +<!ENTITY ServerSpecificExtentions "특정 서버 확장"> +<!ENTITY MiscExtentions "기타 확장"> <!ENTITY PECLReference "PCEL 함수 레퍼런스"> <!ENTITY AddOnReference "애드온 확장 함수 레퍼런스"> <!ENTITY PEAR "PEAR: PHP 확장 및 어플리케이션 저장소"> @@ -37,6 +65,7 @@ supplemental files to mark section titles --> <!ENTITY reftitle.changelog '<title>변경 기록</title>'> <!ENTITY reftitle.classes '<title>예약 클래스</title>'> +<!ENTITY reftitle.classsynopsis '<title>클래스 개요</title>'> <!ENTITY reftitle.constants '<title>예약 상수</title>'> <!ENTITY reftitle.constructor '<title>생성자</title>'> <!ENTITY reftitle.description '<title>설명</title>'> @@ -47,6 +76,7 @@ <!ENTITY reftitle.install '<title>설치</title>'> <!ENTITY reftitle.intro '<title>소개</title>'> <!ENTITY reftitle.methods '<title>메쏘드</title>'> +<!ENTITY reftitle.notes '<title>주의</title>'> <!ENTITY reftitle.parameters '<title>매개변수</title>'> <!ENTITY reftitle.properties '<title>속성</title>'> <!ENTITY reftitle.required '<title>요구 조건</title>'> @@ -54,5 +84,6 @@ <!ENTITY reftitle.runtime '<title>실행시 설정</title>'> <!ENTITY reftitle.returnvalues '<title>반환값</title>'> <!ENTITY reftitle.seealso '<title>참고</title>'> -<!ENTITY reftitle.notes '<title>주의</title>'> +<!ENTITY reftitle.setup '<title>설치/설정</title>'> +<!ENTITY reftitle.unicode '<title>유니코드</title>'> http://cvs.php.net/viewvc.cgi/phpdoc-kr/make_chm_index.html?r1=1.2&r2=1.3&diff_format=u Index: phpdoc-kr/make_chm_index.html diff -u phpdoc-kr/make_chm_index.html:1.2 phpdoc-kr/make_chm_index.html:1.3 --- phpdoc-kr/make_chm_index.html:1.2 Mon Aug 6 23:22:29 2007 +++ phpdoc-kr/make_chm_index.html Fri Mar 28 17:54:59 2008 @@ -1,5 +1,5 @@ <HTML> -<!-- EN-Revision: 1.5 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: progcom Status: ready --> <HEAD> <TITLE>PHP Manual</TITLE> <META NAME="HTTP_EQUIV" CONTENT="text/html; charset=utf-8"> @@ -21,7 +21,7 @@ <div class="author">Friedhelm Betz</div> <div class="author">Antony Dovgal</div> <div class="author">Nuno Lopes</div> -<div class="author">Philip Olson</div> +<div class="author">Hannes Magnusson</div> <div class="author">Georg Richter</div> <div class="author">Damien Seguy</div> <div class="author">Jakub Vrana</div> @@ -31,7 +31,7 @@ <BR><P ALIGN="CENTER">파일 생성일: [GENTIME]<BR> 최신 버전을 얻으려면 <A HREF="http://www.php.net/docs.php">http://www.php.net/docs.php</A>를 방문하십시오.</P> -<BR><P CLASS="copyright" ALIGN="CENTER"><A HREF="copyright.html">Copyright</A> &copy; 1997 - 2007 the PHP Documentation Group</P> +<BR><P CLASS="copyright" ALIGN="CENTER"><A HREF="copyright.html">Copyright</A> &copy; 1997 - 2008 the PHP Documentation Group</P> </TD><TD><IMG SRC="spacer.gif" WIDTH="10" HEIGHT="1"></TD></TR> <TR><TD COLSPAN="3"><DIV CLASS="NAVFOOTER"><TABLE BGCOLOR="#CCCCFF" BORDER="0" http://cvs.php.net/viewvc.cgi/phpdoc-kr/faq/general.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc-kr/faq/general.xml diff -u phpdoc-kr/faq/general.xml:1.3 phpdoc-kr/faq/general.xml:1.4 --- phpdoc-kr/faq/general.xml:1.3 Sat Jun 23 13:51:36 2007 +++ phpdoc-kr/faq/general.xml Fri Mar 28 17:54:59 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.19 Maintainer: fuzzy74 Status: ready --> +<!-- EN-Revision: 1.25 Maintainer: progcom Status: ready --> +<!-- CREDITS: fuzzy74 --> <chapter xml:id="faq.general" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>일반적인 정보</title> <titleabbrev>일반적인 정보</titleabbrev> @@ -25,12 +25,6 @@ 목적은 웹개발자에게 동적으로 생성되는 페이지를 빨리 만들수 있도록 하는 데 있습니다. </para> - <para> - Stig S&aelig;ther Bakken 가 집필하였으며 PHP를 잘 소개한 안내서는 - Zend 웹사이트의 <link xlink:href="&url.zend.introduction;">여기</link>서 - 구할 수 있습니다. 또, <link xlink:href="&url.php.conf;">PHP Conference Material</link>도 - 도움이 될것입니다. - </para> </answer> </qandaentry> @@ -56,11 +50,11 @@ <answer> <para> PHP/FI 2.0는 PHP의 초기 버전이며 더이상 지원되지 않습니다. PHP 3는 - PHP/FI 2.0의 다음 버전으로서 좀 더 나아진 단계입니다. PHP 4는 PHP의 - 현재 버전이고 <link xlink:href="&url.zend;">젠드 엔진(Zend engine)</link>을 - 사용합니다. PHP 5는 <link xlink:href="&url.zend.future;">젠드 엔진 2(Zend engine 2)</link>를 사용하며 - 더 많은 추가적인 <link linkend="ref.classobj">OOP</link>특성도 가지고 있습니다. - PHP 5는 현재 시험단계입니다. + PHP/FI 2.0의 다음 버전으로서 좀 더 나아진 단계입니다. PHP 4는 + <link xlink:href="&url.zend;">젠드 엔진</link>을 기반으로 사용하는 PHP의 + 현 세대입니다. PHP 5는 <link xlink:href="&url.zend.future;">젠드 엔진 + 2</link>를 사용하여, 추가적인 많은 <link + linkend="ref.classobj">OOP</link> 특성을 제공합니다. </para> </answer> </qandaentry> @@ -72,7 +66,7 @@ <answer> <para> 네, PHP 4 소스 디렉토리 밑의 <filename>INSTALL</filename>문서를 - 참고하세요. 이것과 관련된 섹션은 <link linkend="migration4.php4.with.php3">appendix</link>입니다. + 참고하세요. </para> </answer> </qandaentry> @@ -83,8 +77,7 @@ </question> <answer> <para> - PHP 4 제작자가 이에 관련된 <link xlink:href="&url.zend.articles;">몇가지 글</link> - 을 썼습니다. 다음은 좀 더 중요한 새로운 특성에 대한 것을 정리했습니다. + 중요한 몇가지 새 기능의 목록입니다: <itemizedlist> <listitem> <simpara>확장된 API 모듈</simpara> @@ -112,9 +105,8 @@ </listitem> </itemizedlist> 이 특정은 물론 다른 특성에 대해 더 자세히 알고 싶다면 - <link xlink:href="&url.zend.new;">What's new in PHP 4 overview</link>문서를 - 참고하세요. PHP 3에서 PHP 4로 마이그레이션하려 한다면 - <link linkend="migration4">appendix</link>섹션도 참고 하세요. + <link xlink:href="&url.zend.new;">What's new in PHP 4 + overview</link>문서를 참고하세요. </para> </answer> </qandaentry> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/constants.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/array/constants.xml diff -u phpdoc-kr/reference/array/constants.xml:1.4 phpdoc-kr/reference/array/constants.xml:1.5 --- phpdoc-kr/reference/array/constants.xml:1.4 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/array/constants.xml Fri Mar 28 17:54:59 2008 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.6 Maintainer: fuzzy74 Status: unknown --> -<section xml:id="array.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- EN-Revision: 1.12 Maintainer: progcom Status: 0329 --> +<!-- CREDITS: fuzzy74 --> +<appendix xml:id="array.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants.core; <para> @@ -100,6 +101,18 @@ </simpara> </listitem> </varlistentry> + <varlistentry> + <term> + <constant>SORT_LOCALE_STRING</constant> + (<type>integer</type>) + </term> + <listitem> + <simpara> + <constant>SORT_LOCALE_STRING</constant>는 현재 로케일에 따라서 아이템을 + 문자열로 비교할 때 사용합니다. PHP 4.4.0과 5.0.2에서 추가되었습니다. + </simpara> + </listitem> + </varlistentry> </variablelist> </para> <variablelist> @@ -214,7 +227,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/simplexml/book.xml?view=markup&rev=1.1 Index: phpdoc-kr/reference/simplexml/book.xml +++ phpdoc-kr/reference/simplexml/book.xml <?xml version="1.0" encoding="utf-8"?> <!-- EN-Revision: 1.2 Maintainer: progcom Status: ready --> <!-- Purpose: xml --> <!-- Membership: bundled, external --> <book xml:id="book.simplexml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>SimpleXML</title> <!-- {{{ preface --> <preface xml:id="intro.simplexml"> &reftitle.intro; <para> SimpleXML 확장은 XML을 객체로 변환하는 매우 간단하고 쉬운 방식을 제공합니다. XML을 일반적인 프로퍼티 선택자와 배열 이터레이터를 사용하여 처리할 수 있습니다. </para> </preface> <!-- }}} --> &reference.simplexml.setup; &reference.simplexml.constants; &reference.simplexml.examples; &reference.simplexml.reference; </book> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/simplexml/configure.xml?view=markup&rev=1.1 Index: phpdoc-kr/reference/simplexml/configure.xml +++ phpdoc-kr/reference/simplexml/configure.xml <?xml version="1.0" encoding="utf-8"?> <!-- EN-Revision: 1.2 Maintainer: progcom Status: ready --> <section xml:id="simplexml.installation" xmlns="http://docbook.org/ns/docbook"> &reftitle.install; <para> SimpleXML 확장은 기본으로 설치됩니다. 설치하지 않으려면, <option role="configure">--disable-simplexml</option> 옵션을 사용하십시오. </para> </section> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/simplexml/examples.xml?view=markup&rev=1.1 Index: phpdoc-kr/reference/simplexml/examples.xml +++ phpdoc-kr/reference/simplexml/examples.xml <?xml version="1.0" encoding="utf-8"?> <!-- EN-Revision: 1.2 Maintainer: progcom Status: ready --> <chapter xml:id="simplexml.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <section xml:id="simplexml.examples-basic"> <para> 여기 있는 많은 예제는 XML 문자열이 필요합니다. 모든 예제에서 문자열을 반복하는 대신에, 각 예제에서 포함하는 파일을 넣어두겠습니다. 이 파일은 다음 예제 섹션에 있습니다. 이 방법 대신, XML 문서를 만들고 <function>simplexml_load_file</function>으로 읽어올 수도 있습니다. </para> <para> <example> <title>XML 문자열을 가진 포함 파일 example.php</title> <programlisting role="php" xml:id="simplexml.examples.movie"> <![CDATA[ <?php $xmlstr = <<<XML <?xml version='1.0' standalone='yes'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> </character> <character> <name>Mr. Coder</name> <actor>El Act&#211;r</actor> </character> </characters> <plot> So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a documentary. </plot> <great-lines> <line>PHP solves all my web problems</line> </great-lines> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> </movies> XML; ?> ]]> </programlisting> </example> </para> <para> SimpleXML의 간단함은 기본 XML 문서에서 하나의 문자열이나 숫자를 가져오는 데에서 보여집니다. <example> <title><literal>&lt;plot&gt;</literal> 가져오기.</title> <programlisting role="php"><![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); echo $xml->movie[0]->plot; // "So this language. It's like..." ?> ]]> </programlisting> </example> </para> <para> XML 문서 안에 PHP 이름 규칙에 어긋나는 요소(예: 하이픈)에 접근할 때는 요소 이름을 {}과 '로 감쌉니다. <example> <title><literal>&lt;line&gt;</literal> 가져오기.</title> <programlisting role="php"> <![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); echo $xml->movie->{'great-lines'}->line; // "PHP solves all my web problems" ?> ]]> </programlisting> </example> </para> <para> <example> <title>SimpleXML에서 다중 요소에 접근하기.</title> <simpara> 하나의 부모 요소에 포함되는 여러 개의 자식 요소에 접근할 때는, 일반적인 반복 기술이 적용됩니다. </simpara> <programlisting role="php"> <![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); /* 각 <movie> 노드에서, 각각의 <plot>을 출력합니다. */ foreach ($xml->movie as $movie) { echo $movie->plot, '<br />'; } ?> ]]> </programlisting> </example> </para> <para> <example> <title>속성 사용하기</title> <simpara> 여기까지, 요소 이름과 값만을 다뤘습니다. SimpleXML은 요소의 속성에도 접근할 수 있습니다. 요소 속성에 접근할때는 요소를 단순히 <type>array</type>로 취급하면 됩니다. </simpara> <programlisting role="php"> <![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); /* 첫번째 movie의 <rating> 노드에 접근합니다. * Output the rating scale, too. */ foreach ($xml->movie[0]->rating as $rating) { switch((string) $rating['type']) { // Get attributes as element indices case 'thumbs': echo $rating, ' thumbs up'; break; case 'stars': echo $rating, ' stars'; break; } } ?> ]]> </programlisting> </example> </para> <para> <example> <title>요소와 속성을 텍스트와 비교하기.</title> <simpara> 요소와 속성을 문자열과 비교하거나, 문자열을 요구하는 함수에 통과시킬 때는 <literal>(string)</literal>을 사용하여 문자열로 변환해야 합니다. 그렇지 않으면, PHP는 요소를 객체로 취급합니다. </simpara> <programlisting role="php"><![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); if ((string) $xml->movie->title == 'PHP: Behind the Parser') { print 'My favorite movie.'; } htmlentities((string) $xml->movie->title); ?> ]]> </programlisting> </example> </para> <para> <example> <title>XPath 사용하기.</title> <simpara> SimpleXML은 <acronym>XPath</acronym> 지원을 내장하고 있습니다. 모든 <literal>&lt;character&gt;</literal> 요소를 찾으려면: </simpara> <programlisting role="php"> <![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); foreach ($xml->xpath('//character') as $character) { echo $character->name, 'played by ', $character->actor, '<br />'; } ?> ]]> </programlisting> <simpara> '<literal>//</literal>'은 와일드카드로 사용됩니다. 절대 결로를 지정하려면, 슬래쉬 하나를 생략하십시오. </simpara> </example> </para> <para> <example> <title>값 설정하기.</title> <simpara> SimpleXML의 데이터는 바뀔 수 있습니다. SimpleXML은 모든 객체에 대한 변경을 허용합니다. </simpara> <programlisting role="php"> <![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); $xml->movie[0]->characters->character[0]->name = 'Miss Coder'; echo $xml->asXML(); ?> ]]> </programlisting> <simpara> 위 코드는 원본에서 Ms. Coder를 Miss Coder로 변경한 새 XML 문서를 출력합니다. </simpara> </example> </para> <para> <example> <title>요소와 속성 추가하기.</title> <simpara> PHP 5.1.3부터, SimpleXML은 자식과 속성을 쉽게 추가할 수 있게 되었습니다. </simpara> <programlisting role="php"> <![CDATA[ <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); $character = $xml->movie[0]->characters->addChild('character'); $character->addChild('name', 'Mr. Parser'); $character->addChild('actor', 'John Doe'); $rating = $xml->movie[0]->addChild('rating', 'PG'); $rating->addAttribute('type', 'mpaa'); echo $xml->asXML(); ?> ]]> </programlisting> <simpara> 위 코드는 원본 XML에서 새로운 character와 rating을 추가한 XML 문서를 출력합니다. </simpara> </example> </para> <para> <example> <title>DOM 상호 작용.</title> <simpara> PHP는 XML 노드를 SimpleXML과 DOM 형식으로 변환할 수 있습니다. 이 예제는 DOM 요소를 SimpleXML로 바꾸는 방법을 보여줍니다. </simpara> <programlisting role="php"> <![CDATA[ <?php $dom = new domDocument; $dom->loadXML('<books><book><title>blah</title></book></books>'); if (!$dom) { echo 'Error while parsing the document'; exit; } $s = simplexml_import_dom($dom); echo $s->book[0]->title; ?> ]]> </programlisting> </example> </para> </section> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/simplexml/setup.xml?view=markup&rev=1.1 Index: phpdoc-kr/reference/simplexml/setup.xml +++ phpdoc-kr/reference/simplexml/setup.xml <?xml version="1.0" encoding="utf-8"?> <!-- EN-Revision: 1.2 Maintainer: progcom Status: ready --> <chapter xml:id="simplexml.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="simplexml.requirements"> &reftitle.required; <para> SimpleXML 확장은 PHP 5가 필요합니다. </para> </section> <!-- }}} --> <!-- {{{ Installation --> &reference.simplexml.configure; <!-- }}} --> <!-- {{{ Configuration --> <section xml:id="simplexml.configuration"> &reftitle.runtime; &no.config; </section> <!-- }}} --> <!-- {{{ Resources --> <section xml:id="simplexml.resources"> &reftitle.resources; &no.resource; </section> <!-- }}} --> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.kr (#732) next »