Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-05-2009, 03:08 AM   PM User | #1
NateC
New to the CF scene

 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
NateC is an unknown quantity at this point
my first sitemap, with errors

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
NateC is offline   Reply With Quote
Old 11-05-2009, 03:44 AM   PM User | #2
oesxyl
Senior Coder


 
Join Date: Dec 2007
Posts: 4,658
Thanks: 374
Thanked 562 Times in 551 Posts
oesxyl has a spectacular aura aboutoesxyl has a spectacular aura about
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
oesxyl is offline   Reply With Quote
Old 11-05-2009, 03:59 AM   PM User | #3
NateC
New to the CF scene

 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
NateC is an unknown quantity at this point
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.
NateC is offline   Reply With Quote
Old 11-09-2009, 10:03 AM   PM User | #4
DacehallReggae
New to the CF scene

 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
DacehallReggae is an unknown quantity at this point
hello everyone Have a nice day
DacehallReggae is offline   Reply With Quote
Old 11-09-2009, 11:21 PM   PM User | #5
Apostropartheid
Comrade Grammar Nazi


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Location: Do you know where Nazi Zombies come from?
Posts: 2,216
Thanks: 13
Thanked 182 Times in 180 Posts
Apostropartheid is on a distinguished road
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.
Apostropartheid is offline   Reply With Quote
Old 11-09-2009, 11:26 PM   PM User | #6
oesxyl
Senior Coder


 
Join Date: Dec 2007
Posts: 4,658
Thanks: 374
Thanked 562 Times in 551 Posts
oesxyl has a spectacular aura aboutoesxyl has a spectacular aura about
Quote:
Originally Posted by Apostropartheid View Post
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,
Code:
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.

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

best regards

Last edited by oesxyl; 11-09-2009 at 11:30 PM.. Reason: fix the line number from 4 to 6
oesxyl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:56 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.