I want to fetch records from database and want to show listing in xml form. e.g

<url>
  <loc>http://www.test.com/about-us/</loc>
  <priority>0.64</priority>
  <lastmod>2009-05-04T10:10:21+00:00</lastmod>
  <changefreq>daily</changefreq>
</url>
<url>
  <loc>http://www.test.com/about-us/about-factory/</loc>
  <priority>0.64</priority>
  <lastmod>2009-05-04T10:10:21+00:00</lastmod>
  <changefreq>daily</changefreq>
</url>
<url>
  <loc>http://www.test.com/about-us/chairman-massage/</loc>
  <priority>0.64</priority>
  <lastmod>2009-05-04T10:10:21+00:00</lastmod>
  <changefreq>daily</changefreq>
</url>

the urls are dynamic. I am using statically now but want to use dynamically. please help

Recommended Answers

All 2 Replies

please help

Just have php echo out the xml. Its pretty easy.

Loop through the db records and display them in a xml format. Send the proper headers and you have an dynamic xml file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.