FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Problem creating XML file
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Problem creating XML file [message #179556] Wed, 07 November 2012 12:42 Go to previous message
Sarah is currently offline  Sarah
Messages: 30
Registered: December 2010
Karma:
Member
I need to create this structure

<docAzione>
<documento nome="Prova1.txt" />
<documento nome="Prova2.txt" />
</docAzione>


I tried doing:


$docAzione = $azione->addChild('docAzione');

while ($row_files = mysql_fetch_array($result_files,MYSQL_ASSOC)) {

......

$docAzione->addChild('documento', $row_files{'fm_nomefile'});


But result is:

<docAzione>
<documento>Prova1.txt</documento>
<documento>Prova2.txt</documento>
</docAzione>


(wrong)

So I tried with

$docAzione->addAttribute('nome', $row_files{'fm_nomefile'});

And I show:

<docAzione nome="Prova1.txt"/>


(wrong)


Where is it my error?

Thanks
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How awesome Virtual Sailor 7 is
Next Topic: Order of Echoed HTML Output
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 04:02:47 GMT 2024

Total time taken to generate the page: 0.04677 seconds