homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Html - Xml
How do I show my xml in html

 10:02 am on Jul 12, 2005 (gmt 0)

Hi all,

I have a very stupid question. I have never worked with xml and therefor dont know a thing about it.

I have however now created a xml sitemap (for google). If I click on the file sitemap.xml, it shows me the actual code in the browser. Why? How do I get it to show the sitemap in html, or how do I see the actual sitemap (links etc) and not the code. Must I somehow reference the file (sitemap.xml) in my sitemap.HTML file?




 10:04 am on Jul 12, 2005 (gmt 0)

I'm not sure what code you've already written but usually you'd use something like XSLT for this.


 10:25 am on Jul 12, 2005 (gmt 0)


Thanks for your reply. The code/page was created by a google sitemaps program. All I want to know is how to view the page - not the code, but the actual content.

IE. I wouldn't want to have my clients see the code (whether html or xml) of the page, but the actual content, if you know what I mean!?



 10:34 am on Jul 12, 2005 (gmt 0)

OR am I totally missing the point here!?!? As I said, I have never used XML before.


 10:38 am on Jul 12, 2005 (gmt 0)

The xml file can be parsed and be displayed as text or html - the script will open the xml and generate a html or text file (there must be scripts to do that, scripts to remove tags using php are common) but anyone opening your xml file will have the code.
you can start there and find the keywords
I think that you can link the xml.

[edited by: encyclo at 6:27 pm (utc) on July 12, 2005]
[edit reason] fix sideways scroll [/edit]


 10:52 am on Jul 12, 2005 (gmt 0)

If the xml is not styled it will be displayed as code. Link it to a CSS style sheet (or xsl) and it will display properly, assuming you use the correct doctypes, also.


 11:13 am on Jul 12, 2005 (gmt 0)

Welcome to WebmasterWorld [webmasterworld.com] Mirren!

The code/page was created by a google sitemaps program.

The code is only for the Google spider and not for viewing by the end user. You don't need to style it - you can leave it displaying as raw XML. Googlebot likes it that way. ;)

As I understand it you do not need to link to the XML file from any other page - you just register its presence by logging in to the Google Sitemaps interface [google.com] and adding it to your list.


 11:18 am on Jul 12, 2005 (gmt 0)

Thanks all, and thanks encyclo! That was the answer I was after.....

So, for google to crawl my pages, the .xml page is fine? Should I however want a "displayable" sitemap for my users, I would have to create one using html (or whatever)?

Is that it!?


 11:22 am on Jul 12, 2005 (gmt 0)

Yes, you've got it - the XML site map is for the spiders (just Googlebot at the moment, but it's an open standard so other might follow). If you want a site map for the other search engines (Yahoo, MSN, etc.) and for your end users, you need to build one in HTML.


 4:01 pm on Jul 12, 2005 (gmt 0)

Thanks Encyclo - much appreciated!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved