Posted by David Gillen on 07/16/07 15:08
frodo2000@gmail.com said:
> On 16 Lip, 11:36, David Gillen <Bel...@RedBrick.DCU.IE> wrote:
>> Hello.
>>
>> I'm looking to create xml like the following
>>
>> <node>
>> <otherNode>foo</otherNode>
>> <otherNode>bar</otherNode>
>> <otherNode>moo</otherNode>
>> </node>
>> via the simple xml interface.
> Try
>
> $node->otherNode = array();
> $node->otherNode[] = foo;
> $node->otherNode[] = bar;
>
This approach didn't work, but threw an error suggesting it may be possible in
the future.
> or use addChild function: http://uk3.php.net/manual/pl/function.simplexml-element-addChild.php
>
This did work. Many thanks.
D.
--
Fermat was right.
Navigation:
[Reply to this message]
|