this is my question in XML and new to this. i was struggle with creating a xml file using xml parser in php. my requirement is read array which contains data to write in xml. how to process the array for writing data into xml file. i tried to write a single data in xml but i didn’t create a xml file otherwise it just display the data in browser.
[1]: http://www.phpbuilder.com/board/showthread.php?t=10356853 i used the code in the link but i didn’t create a xml file . how to create .xml file using xml parser in php.
I post here a sample code I use to generate a sitemap.xml file on a website. You may find it useful.
This will create a sitemap.xml file in the public directory. Make sure PHP has writing rights on the target directory. Usually, on Linux+Apache, giving writing rights to the www-data user on this directory does the trick.