System.Web.XmlSiteMapProvider.ConvertToSiteMapNode C# (CSharp) Method

ConvertToSiteMapNode() private method

private ConvertToSiteMapNode ( XmlNode xmlNode ) : SiteMapNode
xmlNode XmlNode
return SiteMapNode
		SiteMapNode ConvertToSiteMapNode (XmlNode xmlNode)
		{
			bool localize = EnableLocalization;
			string url = GetOptionalAttribute (xmlNode, "url");
			string title = GetOptionalAttribute (xmlNode, "title");
			string description = GetOptionalAttribute (xmlNode, "description");
			string roles = GetOptionalAttribute (xmlNode, "roles");
			string implicitResourceKey = GetOptionalAttribute (xmlNode, "resourceKey");
				
			// var keywordsList = new List <string> ();
			// if (keywords != null && keywords.Length > 0) {
			// 	foreach (string s in keywords.Split (seperators)) {
			// 		string ss = s.Trim ();
			// 		if (ss.Length > 0)
			// 			keywordsList.Add (ss);
			// 	}
			// }
				
			var rolesList = new List <string> ();
			if (roles != null && roles.Length > 0) {
				foreach (string s in roles.Split (seperators)) {
					string ss = s.Trim ();
					if (ss.Length > 0)
						rolesList.Add (ss);
				}
			}

			url = base.MapUrl (url);

			NameValueCollection attributes = null;
			NameValueCollection explicitResourceKeys = null;
			if (localize)
				CollectLocalizationInfo (xmlNode, ref title, ref description, ref attributes, ref explicitResourceKeys);
			else
				foreach (XmlNode att in xmlNode.Attributes)
					PutInCollection (att.Name, att.Value, ref attributes);

			string key = Guid.NewGuid ().ToString ();
			return new SiteMapNode (this, key, url, title, description, rolesList.AsReadOnly (),
						attributes, explicitResourceKeys, implicitResourceKey);		
		}