How to read XML and display data on website

Discussion in 'HTML & Website Design' started by faizzsheikh, Nov 27, 2013.

  1. #1
    I am not good with coding and scripts.

    I want to use XML to display data on my website, the moment I update my XML the data must appear automatically on the front end of the website.

    Is there an example that you can give or an explanation or a video tutorial.

    Thank You!
     
    faizzsheikh, Nov 27, 2013 IP
  2. adultwordpressthemes

    adultwordpressthemes Active Member

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    83
    #2
    
    
           $xml = ' your feed url';   
           
            // Fetch the feed
           
                $feed = new SimpleXMLElement($xml, null, true);
    
                foreach( $feed as $item ){ 
                       
                          print_r($item);
    
                          //echo the data here
    
                }
    
    
    
    PHP:
     
    adultwordpressthemes, Feb 3, 2014 IP