954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Database records and xml

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

BzzBee
Posting Whiz
327 posts since Apr 2009
Reputation Points: 16
Solved Threads: 48
 

please help

BzzBee
Posting Whiz
327 posts since Apr 2009
Reputation Points: 16
Solved Threads: 48
 

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.

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You