2010-10-20 10:17:28 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!-- $Revision$ -->
|
|
|
|
|
|
|
|
<refentry xml:id="domcdatasection.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>DOMCdataSection::__construct</refname>
|
|
|
|
<refpurpose>Constructs a new DOMCdataSection object</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2011-10-03 20:39:21 +00:00
|
|
|
<constructorsynopsis>
|
|
|
|
<modifier>public</modifier> <methodname>DOMCdataSection::__construct</methodname>
|
2010-10-20 10:17:28 +00:00
|
|
|
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
2011-10-03 20:39:21 +00:00
|
|
|
</constructorsynopsis>
|
2010-10-20 10:17:28 +00:00
|
|
|
<para>
|
|
|
|
Constructs a new CDATA node. This works like the <classname>DOMText</classname>
|
|
|
|
class.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>value</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2010-10-25 19:38:17 +00:00
|
|
|
The value of the CDATA node. If not supplied, an empty CDATA node is created.
|
2010-10-20 10:17:28 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
2011-10-03 20:39:21 +00:00
|
|
|
<example xml:id="domcdatasection.construct.examples.basic">
|
2010-10-20 10:17:28 +00:00
|
|
|
<title>Creating a new DOMCdataSection object</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
|
2011-10-03 20:39:21 +00:00
|
|
|
$dom = new DOMDocument('1.0', 'utf-8');
|
2010-10-20 10:17:28 +00:00
|
|
|
$element = $dom->appendChild(new DOMElement('root'));
|
|
|
|
$text = $element->appendChild(new DOMCdataSection('root value'));
|
2011-10-03 20:39:21 +00:00
|
|
|
echo $dom->saveXML();
|
2010-10-20 10:17:28 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
2011-10-03 20:39:21 +00:00
|
|
|
&example.outputs;
|
|
|
|
<!-- Warning: Crazy CDATA markup. Please DO NOT BREAK it. -->
|
|
|
|
<screen>
|
|
|
|
<![CDATA[
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<root><![CDATA[root value]]]]><![CDATA[></root>
|
|
|
|
]]>
|
|
|
|
</screen>
|
2010-10-20 10:17:28 +00:00
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><methodname>DOMText::__construct</methodname></member>
|
|
|
|
<member><methodname>DOMDocument::createTextNode</methodname></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- 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:"~/.phpdoc/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
|
|
|
|
-->
|