Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sitemap based on XML?

Status
Not open for further replies.

tiamat2012

Programmer
Dec 12, 2004
144
US
Hi everyone,

I've made an xml sitemap using sitemapspal.com, and submitted to google and it's working fine. I thought this was all fine and dandy, but I would like to make a php page where people can view the sitemap. Does anyone know a script that can do this off the xml file I already have?

Or any script to do a sitemap would work, as long as it either reads from an XML file or creates and XML file.

Sincerely,
Kerry
 
If your XML file is not going to be updated very often, your best bet might be to use an XSL file and the XSLTProcessor to parse the XML and generate an HTML page that eveything will be linked to. This will mean less processing for the server since it will be serving up the static page. Additionally, you would want to keep the script for parsing around so that when you upload a newer copy of the site map you could run it again to reproduce the static page.
Link:

Another option, if your more comfortable with associative arrays, is SimpleXML:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top