steinm Thu Feb 1 01:03:07 2001 EDT
Modified files:
/phpdoc/en/functions domxml.xml
Log:
- more documentation of domxml, but not finished yet
- most function are at least listed with a one sentence description
Index: phpdoc/en/functions/domxml.xml
diff -u phpdoc/en/functions/domxml.xml:1.7 phpdoc/en/functions/domxml.xml:1.8
--- phpdoc/en/functions/domxml.xml:1.7 Wed Jan 31 08:37:26 2001
+++ phpdoc/en/functions/domxml.xml Thu Feb 1 01:03:07 2001
@@ -203,8 +203,8 @@
</row>
<row>
<entry>version</entry>
- <entry></entry>
<entry>string</entry>
+ <entry>Version of XML</entry>
</row>
<row>
<entry>encoding</entry>
@@ -214,17 +214,17 @@
<row>
<entry>standalone</entry>
<entry>long</entry>
- <entry></entry>
+ <entry>1 if the file is a standalone version</entry>
</row>
<row>
<entry>type</entry>
<entry>long</entry>
- <entry></entry>
+ <entry>One of the constants in table ... </entry>
</row>
<row>
<entry>compression</entry>
<entry>long</entry>
- <entry></entry>
+ <entry>1 if the file is compressed</entry>
</row>
<row>
<entry>charset</entry>
@@ -250,46 +250,46 @@
<tbody>
<row>
<entry>lastchild</entry>
- <entry>domxml_last_child</entry>
+ <entry><function>domxml_last_child</function></entry>
<entry></entry>
</row>
<row>
<entry>children</entry>
- <entry>domxml_children</entry>
+ <entry><function>domxml_children</function></entry>
<entry></entry>
</row>
<row>
<entry>parent</entry>
- <entry>domxml_parent</entry>
+ <entry><function>domxml_parent</function></entry>
<entry></entry>
</row>
<row>
<entry>new_child</entry>
- <entry>domxml_new_child</entry>
+ <entry><function>domxml_new_child</function></entry>
<entry></entry>
</row>
<row>
<entry>get_attribute</entry>
- <entry>domxml_get_attribute</entry>
+ <entry><function>domxml_get_attribute</function></entry>
<entry></entry>
</row>
<row>
<entry>set_attribute</entry>
- <entry>domxml_set_attribute</entry>
+ <entry><function>domxml_set_attribute</function></entry>
<entry></entry>
</row>
<row>
<entry>attributes</entry>
- <entry>domxml_attributes</entry>
+ <entry><function>domxml_attributes</function></entry>
<entry></entry>
</row>
<row>
<entry>node</entry>
- <entry>domxml_node</entry>
+ <entry><function>domxml_node</function></entry>
<entry></entry>
</row>
<row>
- <entry>set_content</entry>
+ <entry><function>set_content</function></entry>
<entry>domxml_set_content</entry>
<entry></entry>
</row>
@@ -421,13 +421,11 @@
<para>
The function parses the XML document in
<parameter>str</parameter> and returns an object of class "Dom
- document", having the properties "doc" (resource), "version"
- (string), "standalone" (long), "type" (long),
- "compression" (long),
- "charset" (long). If available the attributes "url" (string) and
- "name" (string) are set as well.
-
+ document", having the properties as listed above.
</para>
+ <simpara>
+ See also <function>xmldocfile</function>
+ </simpara>
</refsect1>
</refentry>
@@ -447,14 +445,12 @@
<para>
The function parses the XML document in the file named
<parameter>filename</parameter> and returns an object of class
- "Dom document", having the properties "doc" (resource), "version"
- (string), "standalone" (long), "type" (long), "compression" (long),
- "charset" (long). If available the attributes "url" (string) and "name"
- (string) are set as well.
-
- <!-- conspiciously the file attribute is missing? -->
-
+ "Dom document", having the properties as listed above.
+ The file is accessed read only.
</para>
+ <simpara>
+ See also <function>xmldoc</function>
+ </simpara>
</refsect1>
</refentry>
@@ -476,7 +472,12 @@
<para>
The function parses the XML document in
<parameter>str</parameter> and returns a tree PHP objects as the
- parsed document.
+ parsed document. This function is isolated from the other functions,
+ which means, you cannot access the tree wiht any of the other functions.
+ Modifying it, for example by adding nodes, makes no sense since there
+ is currently no way to dump it as an XML file.
+ Though this function may be valueable if you want to read a file and
+ investigate the content.
</para>
</refsect1>
</refentry>
@@ -485,6 +486,7 @@
<refnamediv>
<refname>domxml_root</refname>
<refpurpose>
+ Returns array of root nodes
</refpurpose>
</refnamediv>
<refsect1>
@@ -492,10 +494,11 @@
<funcsynopsis>
<funcprototype>
<funcdef>object <function>domxml_root</function></funcdef>
- <paramdef>string <parameter>str</parameter></paramdef>
+ <paramdef>array <parameter>doc</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Returns an array of nodes located at the root of a an DOM document.
</para>
</refsect1>
</refentry>
@@ -504,17 +507,19 @@
<refnamediv>
<refname>domxml_add_root</refname>
<refpurpose>
+ Adds a further root node
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>object <function>domxml_add_root</function></funcdef>
- <paramdef>string <parameter>str</parameter></paramdef>
+ <funcdef>resource <function>domxml_add_root</function></funcdef>
+ <paramdef>resource <parameter>doc</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Adds a root node to a dom document and returns the new node.
</para>
</refsect1>
</refentry>
@@ -531,10 +536,11 @@
<funcsynopsis>
<funcprototype>
<funcdef>string <function>domxml_dumpmem</function></funcdef>
- <paramdef>object <parameter>doc</parameter></paramdef>
+ <paramdef>resource <parameter>doc</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Creates an XML document from the dom representation.
</para>
</refsect1>
</refentry>
@@ -550,11 +556,13 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>object <function>domxml_attributes</function></funcdef>
- <paramdef>object <parameter>node</parameter></paramdef>
+ <funcdef>array <function>domxml_attributes</function></funcdef>
+ <paramdef>resource <parameter>node</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Returns all attributes of a node as array of objects of type
+ "dom attribute".
</para>
</refsect1>
</refentry>
@@ -563,6 +571,7 @@
<refnamediv>
<refname>domxml_get_attribute</refname>
<refpurpose>
+ Returns a certain attribute of a node
</refpurpose>
</refnamediv>
<refsect1>
@@ -570,10 +579,13 @@
<funcsynopsis>
<funcprototype>
<funcdef>object <function>domxml_get_attribute</function></funcdef>
- <paramdef>string <parameter>str</parameter></paramdef>
+ <paramdef>resource <parameter>node</parameter></paramdef>
+ <paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Returns the attribute with name <parameter>name</parameter> of the given
+ node.
</para>
</refsect1>
</refentry>
@@ -589,10 +601,14 @@
<funcsynopsis>
<funcprototype>
<funcdef>object <function>domxml_set_attribute</function></funcdef>
- <paramdef>string <parameter>str</parameter></paramdef>
+ <paramdef>resource <parameter>node</parameter></paramdef>
+ <paramdef>string <parameter>name</parameter></paramdef>
+ <paramdef>string <parameter>value</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Sets an attribute with name <parameter>name</parameter> of the given
+ node on a value.
</para>
</refsect1>
</refentry>
@@ -608,11 +624,12 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>object <function>domxml_children</function></funcdef>
+ <funcdef>array <function>domxml_children</function></funcdef>
<paramdef>object <parameter>doc|node</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Returns all children of a node as an array of nodes.
</para>
</refsect1>
</refentry>
@@ -628,11 +645,12 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>object <function>domxml_new_child</function></funcdef>
- <paramdef>object <parameter>node</parameter></paramdef>
+ <funcdef>resource <function>domxml_new_child</function></funcdef>
+ <paramdef>resource <parameter>node</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Adds a new child to a node and returns it.
</para>
</refsect1>
</refentry>
@@ -649,10 +667,11 @@
<funcsynopsis>
<funcprototype>
<funcdef>object <function>domxml_new_xmldoc</function></funcdef>
- <paramdef>object <parameter>node</parameter></paramdef>
+ <paramdef>string <parameter>version</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Creates a new dom document from scratch and returns it.
</para>
</refsect1>
</refentry>
@@ -661,17 +680,19 @@
<refnamediv>
<refname>domxml_node</refname>
<refpurpose>
+ Creates new node
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>object <function>domxml_node</function></funcdef>
- <paramdef>object <parameter>node</parameter></paramdef>
+ <funcdef>resource <function>domxml_node</function></funcdef>
+ <paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
+ Create a new node.
</para>
</refsect1>
</refentry>