Hi all, im having trouble trying to write variables from a form into a XML document using the php classes from active-link.org, i followed there tutorial but i can't get it working, any suggestions?
<?php
require_once("classes/include.php");
import("org.active-link.xml.XML");
import("org.active-link.xml.XMLDocument");
import("org.active-link.xml.XMLBranch");
import("org.active-link.xml.Tree");
import("org.active-link.xml.Branch");
$name_flash = $HTTP_POST_VARS["name"] ;
$ingrediants_flash = $HTTP_POST_VARS["ingrediants"] ;
$myXMLDoc = new XMLDocument("recipes.xml,a+");
$myXML = new XML("Recipe_database");
$the_recipe = new XMLBranch("recipe");
$the_name = new XMLBranch("recipe/name");
$the_ingrediants = new XMLBranch("recipe/ingrediants");
$the_name->setTagContent("$name_flash","Recipe_database/recipe/name");
$the_ingrediants->setTagContent("$ingrediants_flash","Recipe_database/recipe/ingrediants");
$recipe_database = $myXML->getBranches ()
// this is where the problem is i believe, up until now the code executes
$recipe_database[0]->addXMLBranch($the_recipe);
$recipe_database[0]->addXMLBranch($the_name);
$recipe_database[0]->addXMLBranch($the_ingrediants);
$myXMLDoc->save("recipes.xml")
?>