2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-06-12 04:42:09 +00:00
|
|
|
<!-- $Revision: 1.9 $ -->
|
|
|
|
<refentry id='function.domnode-get-content'>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>DomNode->get_content</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Gets content of node
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>DomNode->get_content</methodname>
|
|
|
|
<void/>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
This function returns the content of the actual node.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Getting a content</title>
|
|
|
|
<programlisting role="php">
|
2003-05-29 15:29:11 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2003-12-15 16:55:22 +00:00
|
|
|
if (!$dom = domxml_open_mem($xmlstr)) {
|
2003-05-29 15:29:11 +00:00
|
|
|
echo "Error while parsing the document\n";
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
$root = $dom->document_element();
|
|
|
|
|
|
|
|
$node_array = $root->get_elements_by_tagname("element");
|
|
|
|
|
2003-12-15 16:55:22 +00:00
|
|
|
for ($i = 0; $i<count($node_array); $i++) {
|
2004-08-03 17:25:34 +00:00
|
|
|
$node = $node_array[$i];
|
|
|
|
echo "The element[$i] is: " . $node->get_content();
|
2003-05-29 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
]]>
|
2005-06-12 04:42:09 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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:"../../../../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
|
|
|
|
-->
|