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 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: 996c7338d52924681d477a3e03204102734083e1 Maintainer: takagi Status: ready -->
3
+ <!-- EN-Revision: 7c015620f966babd49efbba3b22c1371f3f780b0 Maintainer: takagi Status: ready -->
4
4
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
5
5
<!-- Credits: mumumu -->
6
6
<refentry xml : id =" function.xmlwriter-write-cdata" xmlns =" http://docbook.org/ns/docbook" >
50
50
</para >
51
51
</refsect1 >
52
52
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
+
53
93
<refsect1 role =" seealso" >
54
94
&reftitle.seealso;
55
95
<para >
You can’t perform that action at this time.
0 commit comments