public void SelectUpdateTest() { var success = _testConfigXpathNavigatorMerge.SelectUpdate(CreatNavigationDictionary("/configuration/configSections/section[@name='unity']/@type"), "Hello, this is a wrong type"); Assert.IsTrue(success); }
private void UpdateLogoutput() { if (null == _sourceXmlDoc || string.IsNullOrEmpty(_sourceXmlDoc.OuterXml)) { return; } var targetlogfile = txtLogfileName.Text.Trim(); if (string.IsNullOrWhiteSpace(targetlogfile)) { return; } var xpathNavigatorMerger = new XpathNavigatorMerge(_sourceXmlDoc); var navDictionary = new Dictionary <string, string>(); navDictionary.Add(LogoutputXpath, string.Empty); xpathNavigatorMerger.SelectUpdate(navDictionary, targetlogfile); _sourceXmlDoc.LoadXml(xpathNavigatorMerger.MergedXmlDoc.OuterXml); }