Hi all. i try to output xml data using the following php code but
when i run the php script i don't get the xml output in correct format.
I want the xml to be outputed as shown in this pic:
correct output format:
Not correct xml format:
could any one tell me how to output the xml data in the following format.Thanks
when i run the php script i don't get the xml output in correct format.
Code:
<?
echo" <playing>\n";
echo" <artist>Kambiz</artist> \n";
echo" <song>Shookolat</song> \n";
echo" <image>[URL unfurl="true"]http://www.somesite.com/song_images/kambiz.jpg</image>[/URL] \n";
echo" <rating>2.44444</rating> \n";
echo" <songid>3003</songid> \n";
echo" </playing>\n";
?>
I want the xml to be outputed as shown in this pic:
correct output format:
Code:
- <playing>
<artist>Kambiz</artist>
<song>Shookolat</song>
<image>[URL unfurl="true"]http://www.somesite.com/static/artists/shakila.jpg</image>[/URL]
<rating>2.44444</rating>
<songid>3003</songid>
</playing>
Not correct xml format:
Code:
Kambiz Shookolat [URL unfurl="true"]http://www.somesite.com/song_images/kambiz.jpg[/URL] 2.44444 3003
could any one tell me how to output the xml data in the following format.Thanks