sitemap

XML: Object reference not set to an instance of an object

白昼怎懂夜的黑 提交于 2019-12-11 14:22:23
问题 <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/" title="Úvodní stránka"> <siteMapNode url="Pocitace" title="Počítače" /> <siteMapNode url="Elektronika" title="Elektronika" /> </siteMapNode> </siteMap> And I write to this file new data: XmlDocument originalXml = new XmlDocument(); originalXml.Load(Server.MapPath("../../Web.sitemap")); XmlAttribute title = originalXml.CreateAttribute("title"); title.Value =

Can I get all of requestMapping URL with GET method in the Spring?

ぃ、小莉子 提交于 2019-12-11 14:12:21
问题 I want to make a sitemap.xml file dynamically. If then I need to get all of url address in the controller, How can I resolve this kinds of thing? All I want to do is to generate sitemap.xml with spring. The sitemap.xml have all the url that a search engine should crawl on my site and that's why I need this solution. 回答1: Following code extracts all RequestMappingInfo instances from type and method-level @RequestMapping annotations in @Controller classes. // context = ApplicationContext Map

MVC SitemapProvider: NullReferenceException after refreshing(!) dynamic node pages

混江龙づ霸主 提交于 2019-12-11 08:42:03
问题 I am using the ASP.NET MVC SiteMapProvider 3.0 in my MVC3 page (.NET Framework 4.0). I switched from SiteMapProvider v2 to 3.0 during development but had the described problem in v2 as well. The SiteMapProvider is specified in the Web.config like this: <siteMap defaultProvider="MvcSiteMapProvider" enabled="true"> <providers> <clear/> <add name="MvcSiteMapProvider" type="MvcSiteMapProvider.DefaultSiteMapProvider, MvcSiteMapProvider" siteMapFile="~/Web.Sitemap" securityTrimmingEnabled="false"

web.sitemap generation

人走茶凉 提交于 2019-12-11 05:38:01
问题 I'm wondering if I may be going about this the wrong way and am looking for some guidance. I've created a site map datasource on my website and I then created a site map for it to link to. However, when I create the site map, it looks like I need to enter all the page details. Is there some way of automating this (or at least getting it started)? This is what it generated by default: <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title=""

Google Sitemap Problem

蓝咒 提交于 2019-12-11 01:26:54
问题 I submitted a sitemap to Google and I got this error. Incorrect namespace Your Sitemap or Sitemap index file doesn't properly declare the namespace. Expected: http://www.google.com/schemas/sitemap-image/1.1 Found: http://www.sitemaps.org/schemas/sitemap-image/1.1 I thought that sitemaps.org was okay. I took it from Google's example: Google's sitemap example What am I doing wrong? Any ideas? 回答1: Have you tried replacing http://www.sitemaps.org/schemas/sitemap-image/1.1 with http://www.google

SEO dynamic sitemap [closed]

廉价感情. 提交于 2019-12-10 20:45:38
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Lets say we have Twitter, and every profile needs to get indexed in search engines, how does Twitter handle their sitemap? Is there something like "regex" sitemap for domain or do they re-generate a sitemap for each user? How does this work, for pages that you don't know, so dynamic pages? Look at Wikipedia for

Is it possible use ASP.NET Sitemap to generate Breadcrumbs?

雨燕双飞 提交于 2019-12-10 20:27:19
问题 I want my ASP.NET site to have simple menu string aka Breadcrumbs. I have created Sitemap with all required elements and registered into Web.config. For example: <siteMap> <siteMapNode url="Default.aspx" title="Home" > <siteMapNode url="hosting/Default.aspx" title="Hosting" /> <siteMapNode url="software/Default.aspx" title="Software"> <siteMapNode url="firefox/Default.aspx" title="Firefox"> <siteMapNode url="Download.aspx" title="Download" /> <siteMapNode url="Support.aspx" title="Support" />

Parsing an XML navigation sitemap with PHP

心不动则不痛 提交于 2019-12-10 19:56:58
问题 I am implementing a PHP sitemap parser from an XML file. I am doing relatively well. However, I need the parser to be more dynamic. I need to implement a recursive function will which continue looping for every child_node which is found. A node can contain many child_nodes within another child_node. What I did till now was to implement a seperate foreach loop with different variable names for every child_node however this is not acceptable as it is not so flexible. This is my xml file:

In a sitemap, is it advisable to include links to every page on the site, or only ones that need it?

久未见 提交于 2019-12-10 17:49:35
问题 I'm in the process of creating a sitemap for my website. I'm doing this because I have a large number of pages that can only be reached via a search form normally by users. I've created an automated method for pulling the links out of the database and compiling them into a sitemap. However, for all the pages that are regularly accessible, and do not live in the database, I would have to manually go through and add these to the sitemap. It strikes me that the regular pages are those that get

How to use multiple .sitemap files in ASP.NET

 ̄綄美尐妖づ 提交于 2019-12-10 16:33:57
问题 I think I'm missing something obvious about sitemaps. I'm trying to use a repeater to generate some navigation for a new sitemap we have on our site. But I don't want to use our normal Web.sitemap file, I want to use our new one...we'll call it "Web.NEW.sitemap". The code seems somewhat obvious to a point... <asp:Repeater ID="rptMyRepeater" DataSourceID="mySitemap" runat="server"> <ItemTemplate> blah blah blah </ItemTemplate> </asp:Repeater> <asp:SiteMapDataSource ID="mySitemap" runat="server