PDA

View Full Version : my first sitemap, with errors


NateC
11-05-2009, 03:08 AM
Info:

Creating Sitemap. Why? I want it to be the data source for an asp.net navigation control. Using Expression Web 2 on XP Home SP3.

Okay, here is my sitemap as it stands now:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="">
<siteMapNode url="default.aspx" title="Home" description="Welcome to AquariumProOnline.com!" />
</siteMapNode>
<siteMapNode url="advertise.aspx" tile="Advertise" description="Advertise on AquariumProOnline.com" />
</siteMapNode>
<siteMapNode url="contact.aspx" title="Contact" description="Contact AquariumProOnline.com" />
</siteMapNode>
<siteMapNode url="sitemap.aspx" title="Site Map" description="AquariumProOnline.com Site Map" />
</siteMapNode>
<siteMapNode url="sponsors.aspx" title="Sponsors of AquariumProOnline.com" />
</siteMapNode>
</siteMap>

When previewed in IE8, I get this error:
Server Error in '/AquariumProOnline' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The XML sitemap config file web.sitemap could not be loaded. The 'siteMap' start tag on line 2 does not match the end tag of 'siteMapNode'. Line 7, position 3.

Source Error:


Line 5: </siteMapNode>
Line 6: <siteMapNode url="advertise.aspx" tile="Advertise" description="Advertise on AquariumProOnline.com" />
Line 7: </siteMapNode>
Line 8: <siteMapNode url="contact.aspx" title="Contact" description="Contact AquariumProOnline.com" />
Line 9: </siteMapNode>


Source File: F:\Websites\AquariumProOnline\web.sitemap Line: 7


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

oesxyl
11-05-2009, 03:44 AM
as far as I see there is no http://schemas.microsoft.com/AspNet/SiteMap-File-1.0. Why do you use this?
too much SiteMapNode, you don't have any schema, this structure is very confusing for both human and machine since elements with same name are nested.
There is already a sitemap protocol with a well defined structure:

http://www.sitemaps.org/

why don't you use this one?

best regards

NateC
11-05-2009, 03:59 AM
I used one that shipped with a learning CD. I looked at W3Schools, and found out it is dead simple. So in i went cleaned it up, and made it so easy a cave man can understand it. Now it works. Thanks.

DacehallReggae
11-09-2009, 10:03 AM
hello everyone Have a nice day

Apostropartheid
11-09-2009, 11:21 PM
You close the element twice.
Line 6: <siteMapNode url="advertise.aspx" tile="Advertise" description="Advertise on AquariumProOnline.com" />
Line 7: </siteMapNode>
Get rid of either the end tag or the trailing slash.

oesxyl
11-09-2009, 11:26 PM
You close the element twice.
Line 6: <siteMapNode url="advertise.aspx" tile="Advertise" description="Advertise on AquariumProOnline.com" />
Line 7: </siteMapNode>
Get rid of either the end tag or the trailing slash.
no, is not, :) The xml structure is ambigous but tags closing is correct, :)

1: <siteMapNode url="" title="" description="">
2: <siteMapNode url="default.aspx" title="Home" description="Welcome to AquariumProOnline.com!" />
3: </siteMapNode>

3 close 1 and 2 is empty and closed.

oops, you are right, now I see that starting with line 6 op xml have pair of tags
best regards