[PHP] Re: Simple question on simplexml

2007-04-09 Thread Timothy Murphy
Jochem Maas wrote: > there is this: > > http://php.net/manual/en/function.simplexml-element-addChild.php > > which will allow adding of string data (so you won't be needing to > create the new SimpleXMLElement object as per your example below). > > obviously you will have to first load tghe com

[PHP] Re: Simple question on simplexml

2007-04-09 Thread Timothy Murphy
Haydar TUNA wrote: > You can use following example:) > >$xml = simplexml_load_file("test.xml"); > $xml->body[0]->addChild("book", "Atat�rk The Rebirth Of A Nation"); > ?> This doesn't work. It allows to add a child with some text, as in your example. But it doesn't allow you to ad

[PHP] Re: Simple question on simplexml

2007-04-07 Thread Haydar TUNA
Hello, You can use following example:) body[0]->addChild("book", "Atatürk The Rebirth Of A Nation"); ?> Republic Of Turkey - Ministry of National Education Education Technology Department Ankara / TURKEY Web: http://www.haydartuna.net "Timothy Murphy" <[EMAIL PROTECTED]>, haber iletisin