php-doc-en/reference/dom/domnode.xml

334 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<phpdoc:classref xml:id="class.domnode" xmlns:phpdoc="http://php.net/ns/phpdoc" 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>
<classsynopsisinfo>
<ooclass>
<classname>DOMNode</classname>
</ooclass>
</classsynopsisinfo>
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="domnode.props.nodename">nodeName</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type class="union"><type>string</type><type>null</type></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 class="union"><type>DOMNode</type><type>null</type></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 class="union"><type>DOMNode</type><type>null</type></type>
<varname linkend="domnode.props.firstchild">firstChild</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>DOMNode</type><type>null</type></type>
<varname linkend="domnode.props.lastchild">lastChild</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>DOMNode</type><type>null</type></type>
<varname linkend="domnode.props.previoussibling">previousSibling</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>DOMNode</type><type>null</type></type>
<varname linkend="domnode.props.nextsibling">nextSibling</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>DOMNamedNodeMap</type><type>null</type></type>
<varname linkend="domnode.props.attributes">attributes</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>DOMDocument</type><type>null</type></type>
<varname linkend="domnode.props.ownerdocument">ownerDocument</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>string</type><type>null</type></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 class="union"><type>string</type><type>null</type></type>
<varname linkend="domnode.props.localname">localName</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>string</type><type>null</type></type>
<varname linkend="domnode.props.baseuri">baseURI</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</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[not(@role='procedural')])">
<xi:fallback/>
</xi:include>
</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.
Contrary to the W3C specification, the node value of
<classname>DOMElement</classname> nodes is equal to <link linkend="domnode.props.textcontent">DOMNode::textContent</link> instead
of &null;.
</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. If there is no such node, this returns &null;.</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, or &null; if this node is a <classname>DOMDocument</classname></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>The text content of this node and its descendants.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
<section role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
The unimplemented methods <methodname>DOMNode::compareDocumentPosition</methodname>,
<methodname>DOMNode::isEqualNode</methodname>,
<methodname>DOMNode::getFeature</methodname>,
<methodname>DOMNode::setUserData</methodname> and
<methodname>DOMNode::getUserData</methodname> have been removed.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<!-- {{{ Notes -->
<section role="notes">
&reftitle.notes;
&dom.note.utf8;
</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
-->