Results 1 to 2 of 2

Thread: Help outputing xml in correct format using php

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Help outputing xml in correct format using php

    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.




    PHP Code:
    <?
    echo"  <playing>\n";
    echo"   <artist>Kambiz</artist> \n";
    echo"   <song>Shookolat</song> \n";
    echo"   <image>http://www.somesite.com/song_images/kambiz.jpg</image> \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>http://www.somesite.com/static/artists/shakila.jpg</image> 
      <rating>2.44444</rating> 
      <songid>3003</songid> 
      </playing>
    http://allyoucanupload.webshots.com/...91865848610011


    Not correct xml format:

    Code:
    Kambiz Shookolat http://www.somesite.com/song_images/kambiz.jpg 2.44444 3003
    http://aycu13.webshots.com/image/274...6588372_rs.jpg
    could any one tell me how to output the xml data in the following format.Thanks
    Last edited by tony007; Sep 27th, 2007 at 08:53 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width