public void SaveXml(XmlDocument doc)
        {
            this.DocToSave = doc;

            CreateRoot(XMLROOT);

            if (WaitTask.DoNothingAndContinue)
            {
                this.AddAttribute(XMLATT_DONOTHING, WaitTask.DoNothingAndContinue.ToString());
            }

            if (WaitTask.HasWaitUntilTime)
            {
                this.AddAttribute(XMLATT_WAITUNTIL_MIN, WaitTask.WaitUntilTimeInternal.Minutes.ToString());
                this.AddAttribute(XMLATT_WAITUNTIL_H, WaitTask.WaitUntilTimeInternal.Hours.ToString());
            }

            if (WaitTask.HasSleepTime)
            {
                this.AddAttribute(XMLATT_SLEEPTIME, WaitTask.SleepTimeInMinutes.ToString());
            }

            if (WaitTask.HasSQLCheckStatement)
            {
                this.AddNode(XMLNODE_SQLCHECKSTMT, WaitTask.SQLCheckStatement);
            }

            if (WaitTask.HasSQLConnection)
            {
                this.AddNode(XMLNODE_SQLCONN, WaitTask.SQLConnectionID);
            }

            if (WaitTask.HasSQLRepetitionFrequencyInMinutes)
            {
                this.AddAttribute(XMLATT_SQLREPETITIONTIME, WaitTask.SQLRepetitionFrequencyInMinutes.ToString());
            }

            if (WaitTask.HasMaximumSQLWaitTime)
            {
                this.AddAttribute(XMLATT_SQLMAXWAITTIME, WaitTask.MaximumSQLWaitTime.ToString());
            }

            DocToSave.AppendChild(elementRoot);
        }
 public void AddNode(string nodeName, string nodeValue)
 {
     propertyNode           = DocToSave.CreateNode(XmlNodeType.Element, nodeName, String.Empty);
     propertyNode.InnerText = nodeValue;
     elementRoot.AppendChild(propertyNode);
 }
 public void AddAttribute(string attName, string attValue)
 {
     propertyAtt       = DocToSave.CreateAttribute(attName);
     propertyAtt.Value = attValue;
     elementRoot.Attributes.Append(propertyAtt);
 }
 private void CreateRoot(string rootName)
 {
     elementRoot = DocToSave.CreateElement(rootName);
 }