Tuesday, March 13, 2012

siteMap help

Server Error in '/MySimBook.com (.NET 2.0)' 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 /MySimBook.com (.NET 2.0)/sitemaps/Web.sitemap could not be loaded. The 'siteMapNode' start tag on line 4 does not match the end tag of 'siteMap'. Line 15, position 3.

Source Error:


Line 13: </siteMapNode>
Line 14:
Line 15: </siteMap>

Source File: C:\Documents and Settings\dguilloryjr\My Documents\Visual Studio 2005\Websites\MySimBook.com (.NET 2.0)\sitemaps\Web.sitemap Line: 15


------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


------------------------
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode url="" title="test" description="test">
<siteMapNode url="" title="test" description="test" />
<siteMapNode url="" title="test" description="test" />
<siteMapNode url="" title="test" description="test" />
<siteMapNode url="" title="test" description="test" />

<siteMapNode url="" title="test" description="test">
<siteMapNode url="" title="test" description="test" />

</siteMapNode>

</siteMap>
------------------------

Eight start tags and seven end tags in your XML. Easy miss.

Try:

----------------

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode url="" title="test" description="test">
<siteMapNode url="" title="test" description="test" />
<siteMapNode url="" title="test" description="test" />
<siteMapNode url="" title="test" description="test" />
<siteMapNode url="" title="test" description="test" />
</siteMapNode>

<siteMapNode url="" title="test" description="test">
<siteMapNode url="" title="test" description="test" />

</siteMapNode>

</siteMap>

----------------

Jeff


maybe you can understand what i am trying to do,

if you look at live8081.com you will see that on the right hand side there is a flyout menu of home, i need to get 3 more sections directly under neath the HOME text there with flyout menus also... so i need assistance creating the sitemap file that will bind with that dynamic nav menu...

Thanks


A tag has a start and an end. So this:

<SiteMapNode.....>

is a Start tag, and this:

</SiteMapNode>

is an End tag. They can be on the same line, as in:

<SiteMapNode ...... />

To have different menu levels, nest the tags. Like this:

<SiteMapNode ......>
<SiteMapNode ...... />
</SiteMapNode>

The SiteMapNode tag on the second line is nested inside the one started on the first line and ended on the third. The first line will be the root or Home, the second is a child of the first.

All tags must have a start and an end to be valid. Did you try the code I had in my response?

Jeff


yeah i tried the code above. i do understand what your saying but maybe i am not saying what i need the right way. Where you said "The first line will be the root or Home" i need 4 sections in the home are root...


Ok using this code, i am trying to have 2 sections in the root like home and accounts and both of them will have flyout menus on hover

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="Home" description="">
<siteMapNode url="" title="test" description="" />
<siteMapNode url="" title="test" description="" />
<siteMapNode url="" title="test" description=""/>
</siteMapNode>

<siteMapNode url="" title="Accounts" description="">
<siteMapNode url="" title="test" description="" />
<siteMapNode url="" title="test" description="" />
<siteMapNode url="" title="test" description=""/>
</siteMapNode>

</siteMap>


no ideas

Unfortunatly you cannot have multiple roots... you can only have the one... however you can use the second level to expose the 4 sections you want i.e.

<SiteMap>

<SiteMapNode> <-- Root

<SiteMapNode />
<SiteMapNode />
<SiteMapNode /> <-- Sections to display
<SiteMapNode />

</SiteMapNode>

Then at the object datasource (siteMapDataObject) you set it to ignore the root...

<

asp:SiteMapDataSourceID="SiteMapDataSource1"runat="server"ShowStartingNode="False"/>

and that sould then display the 4 sections at the root level.

Hope this helps


ok i found it thanks!

where would that go in this code: (to ignore the root)

<?

xmlversion="1.0"encoding="utf-8" ?>

<

siteMapxmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<

siteMapNodetitle="Library Home"url="~/contentPages/LibraryHome.aspx"description="Go To Library Home">

<

siteMapNodetitle="Book 0"url="~/contentPages/book0/book.aspx"description="Go To Book 0"/>

<

siteMapNodetitle="Book 1"url="~/contentPages/book1/book.aspx"description="Go To Book 1">

<

siteMapNodetitle="Chapter 0"url="~/contentPages/book1/chapter0/chapter.aspx"description="Go To Chapter 0"/>

<

siteMapNodetitle="Chapter 1"url="~/contentPages/book1/chapter1/chapter.aspx"description="Go To Chapter 1">

<

siteMapNodetitle="Page 1"url="~/contentPages/book1/chapter1/page1.aspx"description="Go To Page 1"/>

</

siteMapNode>

</

siteMapNode>

<

siteMapNodetitle="Book 2"url="~/contentPages/book2/book.aspx"description="Go To Book 2">

<

siteMapNodetitle="Chapter 0"url="~/contentPages/book2/chapter0/chapter.aspx"description="Go To Chapter 0"/>

<

siteMapNodetitle="Chapter 1"url="~/contentPages/book2/chapter1/chapter.aspx"description="Go To Chapter 1">

<

siteMapNodetitle="Page 1"url="~/contentPages/book2/chapter1/page1.aspx"description="Go To Page 1"/>

</

siteMapNode>

<

siteMapNodetitle="Chapter 2"url="~/contentPages/book2/chapter2/chapter.aspx"description="Go To Chapter 2">

<

siteMapNodetitle="Page 1"url="~/contentPages/book2/chapter2/page1.aspx"description="Go To Page 1"/>

<

siteMapNodetitle="Page 2"url="~/contentPages/book2/chapter2/page2.aspx"description="Go To Page 2"/>

</

siteMapNode>

</

siteMapNode>

<

siteMapNodetitle="Book 3"url="~/contentPages/book3/book.aspx"description="Go To Book 3">

<

siteMapNodetitle="Chapter 0"url="~/contentPages/book3/chapter0/chapter.aspx"description="Go To Chapter 0"/>

<

siteMapNodetitle="Chapter 1"url="~/contentPages/book3/chapter1/chapter.aspx"description="Go To Chapter 1">

<

siteMapNodetitle="Page 1"url="~/contentPages/book3/chapter1/page1.aspx"description="Go To Page 1"/>

</

siteMapNode>

<

siteMapNodetitle="Chapter 2"url="~/contentPages/book3/chapter2/chapter.aspx"description="Go To Chapter 2">

<

siteMapNodetitle="Page 1"url="~/contentPages/book3/chapter2/page1.aspx"description="Go To Page 1"/>

<

siteMapNodetitle="Page 2"url="~/contentPages/book3/chapter2/page2.aspx"description="Go To Page 2"/>

</

siteMapNode>

<

siteMapNodetitle="Chapter 3"url="~/contentPages/book3/chapter3/chapter.aspx"description="Go To Chapter 3">

<

siteMapNodetitle="Page 1"url="~/contentPages/book3/chapter3/page1.aspx"description="Go To Page 1"/>

<

siteMapNodetitle="Page 2"url="~/contentPages/book3/chapter3/page2.aspx"description="Go To Page 2"/>

<

siteMapNodetitle="Page 3"url="~/contentPages/book3/chapter3/page3.aspx"description="Go To Page 3"/>

</

siteMapNode>

</

siteMapNode>

</

siteMapNode>

</

siteMap>

0 comments:

Post a Comment