views:

11

answers:

0

Hi,

Is it possible to create a new node using an existing JSimpleXMLElement instance? I am overriding a template for the main menu module, and I would like to create a new child on a certain element and fill the node with an element that's already created (an unordered list with several list items, in a variable $child). If I use addChild(), I will only create an empty node. I've tried this:

$ul = $node->addChild("ul");
$ul = $child;

, but it does not work.

Please help.

Regards, Simon