Hi,
VS2005 creates the default Web.sitemap as follows:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="">
<siteMapNode url="" title="" description="" />
<siteMapNode url="" title="" description="" />
</siteMapNode>
</siteMap>
Which means there must be a parent siteMapNode.
In most examples I saw this parent is used as default.
But why placing default.aspx as a parent?
Anyway, can and should I leave it empty?
I am getting the error because I am using:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="" />
<siteMapNode url="" title="" description="" />
</siteMap>
Thanks,
Miguel
shapper wrote:
Sorry,
But I am completly lost on this.
So if I have 3 pages in my web site: default.aspx, collection.aspx and
contacts.aspx how would my Web.sitemap look?
Thanks,
Miguel
Steve C. Orr [MVP, MCSD] wrote:
Url, Title, and Description are the only attributes required by each
siteMapNode. You can add other attributes if you wish, but you cannot add
other elements or you'll get the error message you described.
Here's more info:
http://SteveOrr.net/articles/SiteMaps.aspx
--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"shapper" <md*****@gmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
Hello,
>
I have 2 questions about Asp.Net 2.0 web.sitemap:
>
1. Where can I find the list of all siteMapNode attributes?
>
I looked eveywhere and couldn't find it.
>
2. I created a Web.sitemap and somehowI am getting an error:
>
"The element siteMap in the namespace
'http://schemas/microsoft.com/AspNet/SiteMap-File.1.0' has invalid
child element 'siteMapaNode' in namespace
"http://schemas.microsoft.com/AspNet/SiteMap-File.1.0".
>
>
My Web.sitemap file is:
>
<?xml version="1.0" encoding="utf-8" ?>
<siteMap
enableLocalization = "true"
xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode
url = "~/default.aspx"
changefreq = "Daily"
description = ""
priority = "0.5"
resourceKey = "Default"
title = "" />
<siteMapNode
url = "~/collection.aspx"
changefreq = "Daily"
description = ""
priority = "0.5"
resourceKey = "Collection"
title = "" />
</siteMap>
>
>
Could someone, please, help me on these two questions?
>
Thanks,
>
Miguel
>