treemenu::createFromXML

From: Date: Wed, 16 Nov 2005 08:18:02 +0000
Subject: treemenu::createFromXML
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21940@lists.php.net to get a copy of this message
Hi!, I'm playing with HTML_TreeMenu. I want to create one from an xml file but... I have this code: // Load the XML file $xml = file_get_contents('../provafile'); $menu = new HTML_TreeMenu(); $menu->createFromXML($xml); $tree = new HTML_TreeMenu_DHTML($menu); And I get: *Fatal error*: Call to undefined method Tree::createfromxmltree() That I don't understand. I have been followed the user doc example at php wiki: http://www.wiki.cc/php?title=HTML_TreeMenu Example with a string (not tested) |<?php include_once('HTML/TreeMenu.php'); // Load the XML file $xml = file_get_contents('tree.xml'); $menu = new HTML_TreeMenu(); $menu->createFromXML($xml); // Chose a generator. You can generate DHTML or a Listbox //$tree = new HTML_TreeMenu_Listbox($menu); $tree = new HTML_TreeMenu_DHTML($menu); echo $tree->toHTML(); ?> | I know it's not tested but anyone knows how to make it work? Thank you. Leo

« previous php.pear.general (#21940) next »