Welcome to WebmasterWorld Guest from 54.234.63.187

Forum Moderators: incrediBILL

Message Too Old, No Replies

Html - Xml

How do I show my xml in html

     

Mirren

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

10+ Year Member



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?

Thanks,
M

Robin_reala

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

WebmasterWorld Senior Member 10+ Year Member



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

Mirren

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

10+ Year Member



Hi,

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!?

Thanks,

Mirren

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

10+ Year Member



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

DanA

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

10+ Year Member



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
[evolt.org...]
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]

drhowarddrfine

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

WebmasterWorld Senior Member 10+ Year Member



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.

encyclo

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

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

Mirren

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

10+ Year Member



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!?

encyclo

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

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

Mirren

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

10+ Year Member



Thanks Encyclo - much appreciated!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month