php-doc-en/reference/dom/domnode.xml
Peter Cowburn c923fcd6d0 Mark DOMNode textContent as readonly.
DOMNode textContent should be documented as read-only, although other implementations of the DOM such as JavaScript allow direct setting of the textContent of an Element to insert plain text without escaping. In PHP, setting the textContent is a no-op.

-- 
Provided by anonymous #17363 (andybkk@hotmail.co.uk)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@326126 c90b9560-bf6c-de11-be94-00142212c4b1
2012-06-12 16:26:11 +00:00

311 lines
9.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<phpdoc:classref xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="class.domnode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The DOMNode class</title>
<titleabbrev>DOMNode</titleabbrev>
<partintro>
<!-- {{{ DOMNode intro
<section xml:id="domnode.intro">
&reftitle.intro;
<para>
</para>
</section>
}}} -->
<section xml:id="domnode.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>DOMNode</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>DOMNode</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<!-- If the property is documented below (xml:id=domnode.props) use this -->
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="domnode.props.nodename">nodeName</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>string</type>
<varname linkend="domnode.props.nodevalue">nodeValue</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>int</type>
<varname linkend="domnode.props.nodetype">nodeType</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNode</type>
<varname linkend="domnode.props.parentnode">parentNode</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNodeList</type>
<varname linkend="domnode.props.childnodes">childNodes</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNode</type>
<varname linkend="domnode.props.firstchild">firstChild</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNode</type>
<varname linkend="domnode.props.lastchild">lastChild</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNode</type>
<varname linkend="domnode.props.previoussibling">previousSibling</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNode</type>
<varname linkend="domnode.props.nextsibling">nextSibling</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMNamedNodeMap</type>
<varname linkend="domnode.props.attributes">attributes</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>DOMDocument</type>
<varname linkend="domnode.props.ownerdocument">ownerDocument</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="domnode.props.namespaceuri">namespaceURI</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>string</type>
<varname linkend="domnode.props.prefix">prefix</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="domnode.props.localname">localName</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="domnode.props.baseuri">baseURI</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="domnode.props.textcontent">textContent</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.domnode')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
</classsynopsis>
<!-- }}} -->
</section>
<!-- {{{ DOMNode properties -->
<section xml:id="domnode.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="domnode.props.nodename">
<term><varname>nodeName</varname></term>
<listitem>
<para>Returns the most accurate name for the current node type</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.nodevalue">
<term><varname>nodeValue</varname></term>
<listitem>
<para>The value of this node, depending on its type</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.nodetype">
<term><varname>nodeType</varname></term>
<listitem>
<para>Gets the type of the node. One of the predefined <link linkend="dom.constants">XML_xxx_NODE constants</link></para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.parentnode">
<term><varname>parentNode</varname></term>
<listitem>
<para>The parent of this node</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.childnodes">
<term><varname>childNodes</varname></term>
<listitem>
<para>
A <classname>DOMNodeList</classname> that contains all
children of this node. If there are no children, this is an empty
<classname>DOMNodeList</classname>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.firstchild">
<term><varname>firstChild</varname></term>
<listitem>
<para>
The first child of this node. If there is no such node, this
returns &null;.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.lastchild">
<term><varname>lastChild</varname></term>
<listitem>
<para>The last child of this node. If there is no such node, this returns &null;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.previoussibling">
<term><varname>previousSibling</varname></term>
<listitem>
<para>
The node immediately preceding this node. If there is no such
node, this returns &null;.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.nextsibling">
<term><varname>nextSibling</varname></term>
<listitem>
<para>
The node immediately following this node. If there is no such
node, this returns &null;.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.attributes">
<term><varname>attributes</varname></term>
<listitem>
<para>
A <classname>DOMNamedNodeMap</classname> containing the
attributes of this node (if it is a <classname>DOMElement</classname>)
or &null; otherwise.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.ownerdocument">
<term><varname>ownerDocument</varname></term>
<listitem>
<para>The <classname>DOMDocument</classname> object associated with this node.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.namespaceuri">
<term><varname>namespaceURI</varname></term>
<listitem>
<para>The namespace URI of this node, or &null; if it is unspecified.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.prefix">
<term><varname>prefix</varname></term>
<listitem>
<para>The namespace prefix of this node, or &null; if it is unspecified.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.localname">
<term><varname>localName</varname></term>
<listitem>
<para>Returns the local part of the qualified name of this node.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.baseuri">
<term><varname>baseURI</varname></term>
<listitem>
<para>
The absolute base URI of this node or &null; if the implementation
wasn't able to obtain an absolute URI.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domnode.props.textcontent">
<term><varname>textContent</varname></term>
<listitem>
<para>This attribute returns the text content of this node and its descendants.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
<!-- {{{ Notes -->
<section role="notes">
&reftitle.notes;
<note>
<para>
The DOM extension uses UTF-8 encoding. Use <function>utf8_encode</function>
and <function>utf8_decode</function> to work with texts in ISO-8859-1
encoding or <link linkend="ref.iconv">Iconv</link> for other encodings.
</para>
</note>
</section>
<!-- }}} -->
<!-- {{{ See also -->
<section role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><link xlink:href="&url.spec.dom3.node;">W3C specification of Node</link></member>
</simplelist>
</para>
</section>
<!-- }}} -->
</partintro>
&reference.dom.entities.domnode;
</phpdoc:classref>
<!-- 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
-->