Click here to Skip to main content
15,883,827 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Ayub Kokabi21-Feb-20 7:37
Ayub Kokabi21-Feb-20 7:37 
GeneralRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Gerry Schmitz21-Feb-20 8:07
mveGerry Schmitz21-Feb-20 8:07 
Questionquery to a xml database Pin
devilonline119-Feb-20 15:57
devilonline119-Feb-20 15:57 
AnswerRe: query to a xml database Pin
OriginalGriff19-Feb-20 20:04
mveOriginalGriff19-Feb-20 20:04 
GeneralRe: query to a xml database Pin
devilonline120-Feb-20 8:59
devilonline120-Feb-20 8:59 
GeneralRe: query to a xml database Pin
Richard Deeming21-Feb-20 0:55
mveRichard Deeming21-Feb-20 0:55 
AnswerRe: query to a xml database Pin
F-ES Sitecore19-Feb-20 23:08
professionalF-ES Sitecore19-Feb-20 23:08 
AnswerRe: query to a xml database Pin
Alkimus15-Mar-20 5:16
professionalAlkimus15-Mar-20 5:16 
I'm not sure if this will help you, but I know how you feel regarding querying XML... It has plagued me for about a week now. I just came up with this code yesterday, it searches, copies and saves XML:
C#
private static object GetSetting(string source, string setting)
		{
			XmlDocument xdoc = new XmlDocument();
			xdoc.Load(source);
			return xdoc.SelectSingleNode("/Settings/" + setting).InnerText;
		}
		private static void AdjustSetting(string source, string setting, string value)
		{
			XmlDocument xdoc = new XmlDocument();
			xdoc.Load(source);
			xdoc.SelectSingleNode("/Settings/" + setting).InnerText = value);
			xdoc.Save(source);
		}

And here is the XML:
XML
<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <Exit>true</Exit>
</Settings>


finally, here is the code I'm using this on:
C#
AdjustSetting(Xmlpath, "Exit", "false");
while (GetSetting(XmlPath, "Exit").ToString() != "true")
{
     ProcessInput(Console.ReadLine());
}


If you need me to explain any of this please feel free to ask. I hope it helps..
QuestionSystem.Web.Services.Protocols.SoapException: Format of the initialization string does not conform to specification starting at index 97. Pin
Member 1474982719-Feb-20 15:36
Member 1474982719-Feb-20 15:36 
QuestionHow to do left and inner join in same query Pin
Mou_kol19-Feb-20 9:34
Mou_kol19-Feb-20 9:34 
AnswerRe: How to do left and inner join in same query Pin
Gerry Schmitz19-Feb-20 12:13
mveGerry Schmitz19-Feb-20 12:13 
GeneralRe: How to do left and inner join in same query Pin
Mou_kol21-Feb-20 22:42
Mou_kol21-Feb-20 22:42 
QuestionBest deployment guide for our winform application using CI/CD Pin
Mou_kol18-Feb-20 8:24
Mou_kol18-Feb-20 8:24 
AnswerRe: Best deployment guide for our winform application using CI/CD Pin
Richard MacCutchan18-Feb-20 10:25
mveRichard MacCutchan18-Feb-20 10:25 
QuestionSystem.FormatException: 'Input string was not in a correct format. Pin
OsvaldoFernandoQueta17-Feb-20 17:43
OsvaldoFernandoQueta17-Feb-20 17:43 
AnswerRe: System.FormatException: 'Input string was not in a correct format. Pin
OriginalGriff17-Feb-20 20:35
mveOriginalGriff17-Feb-20 20:35 
GeneralRe: System.FormatException: 'Input string was not in a correct format. Pin
kalberts17-Feb-20 23:17
kalberts17-Feb-20 23:17 
QuestionI want to open PDF-file on winforms axAcroPDF1.src (Adobe Reader) Pin
Member 1462552315-Feb-20 1:32
Member 1462552315-Feb-20 1:32 
AnswerRe: I want to open PDF-file on winforms axAcroPDF1.src (Adobe Reader) Pin
Eddy Vluggen15-Feb-20 2:59
professionalEddy Vluggen15-Feb-20 2:59 
QuestionDifferent value from input Pin
chipp_zanuff14-Feb-20 6:15
chipp_zanuff14-Feb-20 6:15 
AnswerRe: Different value from input Pin
OriginalGriff14-Feb-20 6:32
mveOriginalGriff14-Feb-20 6:32 
GeneralRe: Different value from input Pin
chipp_zanuff14-Feb-20 17:48
chipp_zanuff14-Feb-20 17:48 
GeneralRe: Different value from input Pin
OriginalGriff14-Feb-20 20:21
mveOriginalGriff14-Feb-20 20:21 
AnswerRe: Different value from input Pin
Eddy Vluggen14-Feb-20 6:35
professionalEddy Vluggen14-Feb-20 6:35 
Questionauto fill data by using 3 layer in aso.net c# Pin
Member 1474357913-Feb-20 22:47
Member 1474357913-Feb-20 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.