cvs: peardoc /en/packages STATUS xml.xml /en/packages/xml xml_tree.xml

From: Date: Tue, 09 Apr 2002 11:23:06 +0000
Subject: cvs: peardoc /en/packages STATUS xml.xml /en/packages/xml xml_tree.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3180@lists.php.net to get a copy of this message
mj Tue Apr 9 07:23:06 2002 EDT Added files: /peardoc/en/packages/xml xml_tree.xml Modified files: /peardoc/en/packages STATUS xml.xml Log: * Documentation for XML_Tree. # It will be taken into the build as soon as the first XML_Tree release # is out. Index: peardoc/en/packages/STATUS diff -u peardoc/en/packages/STATUS:1.9 peardoc/en/packages/STATUS:1.10 --- peardoc/en/packages/STATUS:1.9 Thu Feb 21 08:11:58 2002 +++ peardoc/en/packages/STATUS Tue Apr 9 07:23:06 2002 @@ -28,7 +28,7 @@ XML_rpc - XML_sql2xml w chregu XML_svg2image - chregu -XML_Tree w mj +XML_Tree f mj Xmms - Legend: Index: peardoc/en/packages/xml.xml diff -u peardoc/en/packages/xml.xml:1.5 peardoc/en/packages/xml.xml:1.6 --- peardoc/en/packages/xml.xml:1.5 Sun Apr 7 03:29:15 2002 +++ peardoc/en/packages/xml.xml Tue Apr 9 07:23:06 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <reference id="packages.xml"> <title>XML</title> <partintro> @@ -11,4 +11,7 @@ &packages.xml.xml-rss; &packages.xml.xml-sql2xml; &packages.xml.xml-transformer; + <!-- [mj] Uncomment this when XML_Tree rolls it's first release. + &packages.xml.xml-tree; + --> </reference> Index: peardoc/en/packages/xml/xml_tree.xml +++ peardoc/en/packages/xml/xml_tree.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <!-- Work in progress, no need to translate it right now. --> <refentry id="packages.XML.XML_Tree"> <refnamediv> <refname><classname>XML_Tree</classname></refname> <refpurpose> Allow building of XML data structures. </refpurpose> </refnamediv> <refsynopsisdiv> <synopsis>require_once "XML/Tree.php";</synopsis> </refsynopsisdiv> <refsect1> <title>Introduction</title> <para> The XML_Tree package allows one to build XML data structures using a tree representation, without the need for an extension like DOMXML. </para> <example id="packages.XML.XML_Tree.example"> <title>Basic example</title> <programlisting role="php"> <![CDATA[ $tree = new XML_Tree; $root =& $tree->addRoot("root"); $foo =& $root->addChild("foo"); header("Content-Type: text/xml"); $tree->dump(); ]]> </programlisting> </example> </refsect1> <refsect1 id="package.XML.XML_Tree.constructor"> <title>XML_Tree::XML_Tree</title> <funcsynopsis> <funcprototype> <funcdef>void <function>XML_Tree::XML_Tree</function></funcdef> <paramdef>string <parameter><optional>filename</optional></parameter></paramdef> <paramdef>string <parameter><optional>version</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This function is the constructor for the tree class. It takes two arguments: <parameter>filename</parameter> is the filename and the second parameter <parameter>version</parameter> defines the XML version that should be used (default is 1.0). </para> </refsect1> <refsect1> <title>XML_Tree::addRoot</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::addRoot</function></funcdef> <paramdef>string <parameter>name</parameter></paramdef> <paramdef>string <parameter><optional>content</optional></parameter></paramdef> <paramdef>array <parameter><optional>attributes</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This function adds an new root node to the XML datastructure. The first parameter <parameter>name</parameter> stands for the name of the root element. The second parameter <parameter>content </parameter> represents the data between the opening and closing tag. The third parameter <parameter>attributes</parameter> can take an array of attributes for the node. </para> <para> The function returns an object that represents the new root element. </para> </refsect1> <refsect1> <title>XML_Tree::addChild</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::insertChild</function></funcdef> <paramdef>mixed <parameter>child</parameter></paramdef> <paramdef>string <parameter><optional>content</optional></parameter></paramdef> <paramdef>array <parameter><optional>attributes</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Adds a child node to current node. </para> </refsect1> <refsect1> <title>XML_Tree::insertChild</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::insertChild</function></funcdef> <paramdef>array <parameter>path</parameter></paramdef> <paramdef>integer <parameter>pos</parameter></paramdef> <paramdef>mixed <parameter>child</parameter></paramdef> <paramdef>string <parameter><optional>content</optional></parameter></paramdef> <paramdef>array <parameter><optional>attributes</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Insert new child (<parameter>child</parameter>) into the tree (<parameter>path</parameter>, <parameter>pos</parameter>). </para> </refsect1> <refsect1> <title>XML_Tree::removeChild</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::removeChild</function></funcdef> <paramdef>array <parameter>path</parameter></paramdef> <paramdef>integer <parameter>pos</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Removes a child (<parameter>path</parameter>, <parameter>pos</parameter>) from tree ( <parameter>path</parameter>, <parameter>pos</parameter>) and maintains namespace integrity. </para> </refsect1> <refsect1> <title>XML_Tree::getTreeFromFile</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::getTreeFromFile</function></funcdef> <paramdef /> </funcprototype> </funcsynopsis> <para> This function returns a tree object that represents the structure of the XML file that has been passed to the <link linkend="package.XML.XML_Tree.constructor">constructor </link>. </para> </refsect1> <refsect1> <title>XML_Tree::getTreeFromString</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::getTreeFromString</function></funcdef> <paramdef>string <parameter>str</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Create XML tree from given string <parameter>str</parameter>. This function returns a tree object that represents the structure of the given string. </para> </refsect1> <refsect1> <title>XML_Tree::Clone</title> <funcsynopsis> <funcprototype> <funcdef>object <function>XML_Tree::Clone</function></funcdef> <paramdef /> </funcprototype> </funcsynopsis> <para> This function returns an object that represents a copy of the current XML tree. </para> </refsect1> <refsect1> <title>XML_Tree::get</title> <funcsynopsis> <funcprototype> <funcdef>string <function>XML_Tree::get</function></funcdef> <paramdef /> </funcprototype> </funcsynopsis> <para> This function returns the text representation of the XML tree. </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 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 -->

« previous php.pear.cvs (#3180) next »