<?php
include_once("QSet.class.php");
include_once("QXml.class.php");
$xmlFile = "menu.xml";
/*
* Final Node Set to XML
*
*/
$xml = new QXML;
$xml->setXmlFromFile($xmlFile);
$xml->setNode("menu.submenu.0.submenu.2.@attributes.name", "test");
$xml->setNode("menu.submenu.0.submenu.2.@textNode", "open test");
$xml->setNode("menu.submenu.2.submenu.0.@attributes.name", "test");
$xml->setNode("menu.submenu.2.submenu.0.@attributes.id", "tst");
$xml->setNode("menu.submenu.2.submenu.0.@attributes.headerText", "It works!");
$xml->setNode("menu.submenu.2.submenu.0.@textNode", "open test");
$xml->toXML($xml->getArray());
header("content-type:text/xml");
echo $xml->getXml();
?>
|