File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed
reference/xmlwriter/functions Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 996c7338d52924681d477a3e03204102734083e1 Maintainer: takagi Status: ready -->
3+ <!-- EN-Revision: 7c015620f966babd49efbba3b22c1371f3f780b0 Maintainer: takagi Status: ready -->
44<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
55<!-- Credits: mumumu -->
66<refentry xml : id =" function.xmlwriter-write-cdata" xmlns =" http://docbook.org/ns/docbook" >
5050 </para >
5151 </refsect1 >
5252
53+ <refsect1 role =" examples" >
54+ &reftitle.examples;
55+ <example xml : id =" xmlwriter-write-cdata.example.basic" >
56+ <title ><function >xmlwriter_write_cdata</function > の基本的な使い方</title >
57+ <programlisting role =" php" >
58+ <![CDATA[
59+ <?php
60+ // set up the document
61+ $xml = new XmlWriter();
62+ $xml->openMemory();
63+ $xml->setIndent(true);
64+ $xml->startDocument('1.0', 'UTF-8');
65+ $xml->startElement('mydoc');
66+ $xml->startElement('myele');
67+
68+ // CData output
69+ $xml->startElement('mycdataelement');
70+ $xml->writeCData("text for inclusion as CData");
71+ $xml->endElement();
72+
73+ // end the document and output
74+ $xml->endElement();
75+ $xml->endElement();
76+ echo $xml->outputMemory(true);
77+ ?>
78+ ]]>
79+ </programlisting >
80+ &example.outputs;
81+ <screen >
82+ <![CDATA[
83+ <mydoc>
84+ <myele>
85+ <mycdataelement><![CDATA[text for inclusion as CData]]></mycdataelement>
86+ </myele>
87+ </mydoc>
88+ ]]>
89+ </screen >
90+ </example >
91+ </refsect1 >
92+
5393 <refsect1 role =" seealso" >
5494 &reftitle.seealso;
5595 <para >
You can’t perform that action at this time.
0 commit comments