--- xmlTools/trunk/posUpdate/XmlPatch.cs 2013/03/26 15:23:42 746 +++ xmlTools/trunk/posUpdate/XmlPatch.cs 2013/05/09 10:37:17 867 @@ -95,7 +95,7 @@ namespace xmlTools //---------------------------------------------------Parse Operation command (start) try { - if (forceFiles == null) + if (String.IsNullOrEmpty(forceFiles)) { File = getPatchParameter(operation, "File"); } @@ -114,14 +114,14 @@ namespace xmlTools return false; } - if (Element == "") + if (String.IsNullOrEmpty(Element)) { return false; } //---------------------------------------------------Parse Operation command (end) List filesToProcess = new List(); - if (File == "") + if (String.IsNullOrEmpty(File)) { filesToProcess = Util.getAllXmlFiles(); //no file specified, use all xml files found in same folder } @@ -187,7 +187,7 @@ namespace xmlTools //---------------------------------------------------Parse Operation command (start) try { - if (forceFiles == null) + if (String.IsNullOrEmpty(forceFiles)) { File = getPatchParameter(operation, "File"); } @@ -206,7 +206,7 @@ namespace xmlTools return false; } - if (Element == "") + if (String.IsNullOrEmpty(Element)) { return false; } @@ -214,7 +214,7 @@ namespace xmlTools //---------------------------------------------------Parse Operation command (end) List filesToProcess = new List(); - if (File == "") + if (String.IsNullOrEmpty(File)) { filesToProcess = Util.getAllXmlFiles(); //no file specified, use all xml files found in same folder } @@ -271,7 +271,7 @@ namespace xmlTools command = command.Replace("@COMMAND ", ""); //get only the command to process - if (command.Trim() == "") + if (String.IsNullOrEmpty(command.Trim())) { Program.printAppError(Program.appErrors.PATCH_COMMAND_NOT_FOUND, "Error parsing commandOperation in Patch file: Command is empty."); return false; @@ -298,7 +298,7 @@ namespace xmlTools command = command.Insert(command.Length," -filename:" + this.forceFiles); } - if (paramType != "") + if (!String.IsNullOrEmpty(paramType)) { int startIdx = command.IndexOf(paramType) + paramType.Length; int endIdx = command.IndexOf(" ", startIdx); // it may end with space