static string module = @" <Module> <CustomerSortOrder>60</CustomerSortOrder> <LinkText_Customer>{0}</LinkText_Customer> <LocationId>4291</LocationId> <LocationModuleId>26544</LocationModuleId> <ModuleId>30</ModuleId> <ModuleName>Menu</ModuleName> <NavigateUrl>menu.aspx</NavigateUrl> <pageId>20</pageId> <IsModuleGroup>1</IsModuleGroup> <sort_order>1</sort_order> <MenuId>{1}</MenuId> </Module> "; public string AddWeekMenu(string xml2015, string xml2010) { string result = xml2015; try { XmlDocument x2015 = new XmlDocument(); x2015.LoadXml(xml2015); //step 1 find menu tag group var menutag = x2015.SelectSingleNode("//Group[Group_Name='Menu']"); //remove Menu text from second list menutag.ChildNodes[0].SelectSingleNode("//LinkText_Customer").InnerText = ""; XmlDocument x2010 = new XmlDocument(); x2010.LoadXml(xml2010); XmlNodeList m2010 = x2010.SelectNodes("//ChildNavigation[moduleid=30]"); foreach (XmlNode item in m2010) { //append menu links from 2010 AppendMenuLink(x2015, menutag, item.SelectSingleNode("ChildLinkText").InnerText, item.SelectSingleNode("ChildLinkCustomPageID").InnerText); } //updting menu tag with correct count menutag.SelectSingleNode("//numModules").InnerText = ""+m2010.Count; return x2015.OuterXml; } catch (Exception ex) { LogException(ex); } return result; }
Wednesday
add xml to xmldocument
Subscribe to:
Posts (Atom)
here is powershell script on how to get list of files from changesets associated with one tfs task
$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...

-
Error:The element 'Schedule' has invalid child element 'RecurrenceRule'. List of possible elements expected: 'Occurring...
-
Here is instruction how to make blinking text in rainmeter: 1.right click and select " Edit skin " 2.add following code to temp...
-
2010-11-24 Update: Please download latest version of Pidgin , that has this problem fixed , no additional steps required. Here are 3 ways to...