private static string extractMessage(string exceptionFile)
 {
     System.Text.StringBuilder retVal = new System.Text.StringBuilder();
     try
     {
         System.Xml.XPath.XPathDocument     doc  = new System.Xml.XPath.XPathDocument(exceptionFile);
         System.Xml.XPath.XPathNavigator    nav  = doc.CreateNavigator();
         System.Xml.XPath.XPathNodeIterator iter = nav.Select(@"/*/ServiceException");
         while (iter.MoveNext())
         {
             if (retVal.Length > 0)
             {
                 retVal.Append(System.Environment.NewLine);
             }
             System.Xml.XPath.XPathNodeIterator attIter = iter.Current.Select(@"/code|/Code|/CODE");
             if (attIter.MoveNext())
             {
                 retVal.Append("(" + iter.Current.Value.Trim() + ") ");
             }
             retVal.Append(iter.Current.Value.Trim());
         }
     }
     catch (System.Exception)
     {
         retVal.Append("Unable to extract the error description from the information returned by the WMS server.");
     }
     return(retVal.ToString());
 }
예제 #2
0
        private void updateConfigXml()
        {
            // Write install path to config file
            string xmlPath = Path.Combine(getInstallDir(), "Jitsi Meet Outlook Add-In.dll.config");

            XmlDocument document = new XmlDocument();

            document.Load(xmlPath);
            System.Xml.XPath.XPathNavigator navigator = document.CreateNavigator();


            if (getDomain().Length != 0)
            {
                navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='Domain']/value").SetValue(getDomain());
            }


            if (getRoomID().Length != 0)
            {
                navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='roomID']/value").SetValue(getRoomID());
            }


            navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='requireDisplayName']/value").SetValue(getRequireDisplayName());

            navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='startWithAudioMuted']/value").SetValue(getStartWithAudioMuted());

            navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='startWithVideoMuted']/value").SetValue(getStartWithVideoMuted());

            navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='installDirectory']/value").SetValue(getInstallDir());

            navigator.SelectSingleNode(@"/configuration/userSettings/JitsiMeetOutlook.Properties.Settings/setting[@name='language']/value").SetValue(getLanguage());

            document.Save(xmlPath);
        }
예제 #3
0
        private void Init()
        {
            try {
                string basepath = System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Replace("file:///", "").Replace("/", @"\");
                basepath = System.IO.Path.GetDirectoryName(basepath) + @"\";

                GameCatalogSerializer  gcs = new GameCatalogSerializer();
                System.Xml.XmlDocument doc = gcs.Serialize(games);

                System.Xml.XPath.XPathNavigator nav    = doc.CreateNavigator();
                System.Xml.Xsl.XslTransform     xt     = new System.Xml.Xsl.XslTransform();
                System.Xml.XmlResolver          res    = new System.Xml.XmlUrlResolver();
                System.IO.StringWriter          writer = new System.IO.StringWriter();
                System.Xml.Xsl.XsltArgumentList args   = new System.Xml.Xsl.XsltArgumentList();

                System.Xml.XmlNameTable xnt  = new System.Xml.NameTable();
                System.Xml.XmlReader    xslt = new System.Xml.XmlTextReader(new System.IO.StreamReader(basepath + "GameList.xslt"), xnt);

                xt.Load(xslt, res, new System.Security.Policy.Evidence());
                xt.Transform(nav, args, writer, res);

                string html = writer.ToString();

                WriteHTML(html);
            } catch (Exception ex) {
                string    error = "There was an error generating HTML";
                Exception xe    = ex;
                while (xe != null)
                {
                    error += "<p><b>" + xe.Message + "</b><br><pre>" + xe.StackTrace + "</pre></p>\r\n";
                }
                WriteHTML(error);
            }
        }
예제 #4
0
 bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
 {
     if (r.Name == "BoardPlugins")
     {
         bool everokay = false;
         bool okay;
         for (okay = r.MoveToFirstAttribute(); okay; okay = r.MoveToNext())
         {
             everokay = true;
             try
             {
                 Assembly a = Assembly.LoadFile(r.Value);
                 LoadPeices(a);
                 assemblies.Add(a);
             }
             catch
             {
             }
         }
         if (everokay)
         {
             r.MoveToParent();
         }
         return(true);
     }
     //throw new NotImplementedException();
     return(false);
 }
예제 #5
0
 bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
 {
     if (tracker == null)
     {
         return(false);
     }
     switch (r.Name)
     {
     case "SQL_Security":
         bool everokay = false;
         bool okay;
         for (okay = r.MoveToFirstChild(); okay; okay = r.MoveToNext())
         {
             everokay = true;
             r.MoveToFirstChild();
             tracker.tokens.Add(r.Value as String);
             r.MoveToParent();
             //r.Get
         }
         if (everokay)
         {
             r.MoveToParent();
         }
         return(true);
     }
     //throw new Exception( "The method or operation is not implemented." );
     return(false);
 }
예제 #6
0
        internal Provider(System.Xml.XPath.XPathNavigator nav)
        {
            this._ProviderName = nav.GetAttribute("name", String.Empty);//.Value;
            this._ProviderType = nav.GetAttribute("type", String.Empty);
            var ns = nav.SelectChildren(System.Xml.XPath.XPathNodeType.Element);

            if (nav.MoveToFirstAttribute())
            {
                if ((nav.Name != "name") & (nav.Name != "type"))
                {
                    this._ProviderAttributes.Add(nav.Name, nav.Value);
                }
                while (nav.MoveToNextAttribute())
                {
                    if ((nav.Name != "name") & (nav.Name != "type"))
                    {
                        this._ProviderAttributes.Add(nav.Name, nav.Value);
                    }
                }
            }
            while (ns.MoveNext())
            {
                this._ProviderAttributes.Add(ns.Current.Name, ns.Current.Value);
            }
        }
예제 #7
0
 /// <summary>
 /// Gets the attribute as double.
 /// </summary>
 /// <param name="stdnavi">The navigator.</param>
 /// <param name="attributeName">Name of the attribute.</param>
 /// <param name="expectEnglish">The expect english.</param>
 /// <returns></returns>
 public static double?GetAttributeAsDouble(this System.Xml.XPath.XPathNavigator stdnavi, string attributeName, bool expectEnglish = true)
 {
     if (null != stdnavi)
     {
         try
         {
             string tmp = stdnavi.GetAttribute(attributeName, string.Empty);
             if (expectEnglish)
             {
                 if (!string.IsNullOrEmpty(tmp))
                 {
                     return(DataTypeConverter.DoubleConverter.ParseInvariantCulture(tmp));
                 }
             }
             else
             {
                 if (!string.IsNullOrEmpty(tmp))
                 {
                     return(DataTypeConverter.DoubleConverter.Parse(tmp));
                 }
             }
         }
         catch { }
     }
     return(null);
 }
예제 #8
0
        public static ProviderConfiguration GetProvider(System.Xml.XPath.XPathNavigator nav)
        {
            ProviderConfiguration providers = new ProviderConfiguration();

            providers.GetProviders(nav);
            return(providers);
        }
예제 #9
0
 protected override void ProcessFile(InstallFile file, System.Xml.XPath.XPathNavigator nav)
 {
     if (file != null)
     {
         Files.Add(file);
     }
 }
예제 #10
0
 /// <summary>
 /// Gets the attribute as string.
 /// </summary>
 /// <param name="stdnavi">The navigator.</param>
 /// <param name="attributeName">Name of the attribute.</param>
 /// <param name="selectPath">The select path (or null if no path adjustment needed).</param>
 /// <param name="defaultValue">The default value.</param>
 /// <returns></returns>
 public static string GetAttributeAsString(this System.Xml.XPath.XPathNavigator stdnavi, string attributeName, string selectPath, string defaultValue)
 {
     if (null != stdnavi)
     {
         try
         {
             string tmp;
             if (null != selectPath)
             {
                 System.Xml.XPath.XPathNavigator navi = AdjustNaviIfNeeded(stdnavi, selectPath);
                 tmp = navi.GetAttribute(attributeName, string.Empty);
             }
             else
             {
                 tmp = stdnavi.GetAttribute(attributeName, string.Empty);
             }
             if (string.IsNullOrEmpty(tmp))
             {
                 return(defaultValue);
             }
             return(tmp);
         }
         catch { }
     }
     return(defaultValue);
 }
        private bool ParseResponse()
        {
            try
            {
                System.IO.MemoryStream stream = new System.IO.MemoryStream();
                System.IO.StreamWriter writer = new System.IO.StreamWriter(stream);
                writer.Write(sResponse);
                writer.Flush();
                stream.Position = 0;

                System.Xml.XPath.XPathDocument doc = new System.Xml.XPath.XPathDocument(stream);

                System.Xml.XPath.XPathNavigator nav = doc.CreateNavigator();

                String sValue = nav.SelectSingleNode("/node/isMaster/text()").Value;

                nav = null;
                doc = null;
                stream.Close();
                stream = null;

                return(Boolean.Parse(sValue));
            }
            catch (Exception ex)
            {
                Trace.TraceWarning("Exception: " + ex.Message + Environment.NewLine + "StackTrace: " + ex.StackTrace);
                return(false);
            }
        }
예제 #12
0
        Digest.Model.WebReferenceUrl[] getWebReferenceUrls(DirectoryInfo folder, string currentPath)
        {
            string relPath = Path.Combine(currentPath, folder.Name);
            string url     = string.Empty;
            List <Digest.Model.WebReferenceUrl> webReferenceUrls = new List <Digest.Model.WebReferenceUrl>();

            FileInfo[] fileInfo = folder.GetFiles("*.discomap");
            if (fileInfo != null && fileInfo.Length > 0)
            {
                System.Xml.XPath.XPathDocument  xDoc = new System.Xml.XPath.XPathDocument(fileInfo[0].FullName);
                System.Xml.XPath.XPathNavigator xNav = xDoc.CreateNavigator();
                string xpathExpression = @"DiscoveryClientResultsFile/Results/DiscoveryClientResult[@referenceType='System.Web.Services.Discovery.ContractReference']/@url";
                System.Xml.XPath.XPathNodeIterator xIter = xNav.Select(xpathExpression);
                if (xIter.MoveNext())
                {
                    url = xIter.Current.TypedValue.ToString();
                }
            }
            if (!string.IsNullOrEmpty(url))
            {
                Digest.Model.WebReferenceUrl newWebReferenceUrl = new Digest.Model.WebReferenceUrl();
                newWebReferenceUrl.RelPath       = relPath;
                newWebReferenceUrl.UpdateFromURL = url;
                webReferenceUrls.Add(newWebReferenceUrl);
            }
            foreach (DirectoryInfo dirInfo in folder.GetDirectories())
            {
                webReferenceUrls.AddRange(getWebReferenceUrls(dirInfo, relPath));
            }
            return(webReferenceUrls.ToArray());
        }
예제 #13
0
        void GetProviders(System.Xml.XPath.XPathNavigator nav1)
        {
            var navProviders = nav1.Select("providers");

            while (navProviders.MoveNext())
            {
                var navs = navProviders.Current.SelectChildren(System.Xml.XPath.XPathNodeType.Element);

                while (navs.MoveNext())
                {
                    var cur = navs.Current.Clone();

                    string name = cur.GetAttribute("name", string.Empty);
                    switch (cur.Name.ToLower())
                    {
                    case "add":
                        this.Providers[name] = new Provider(cur);
                        break;

                    case "remove":
                        this.Providers.Remove(name);
                        break;

                    case "clear":
                        this.Providers.Clear();
                        break;
                    }
                }
            }
        }
예제 #14
0
        private void Display()
        {
            this.Cursor = Cursors.WaitCursor;
            XslCompiledTransform xsl = new XslCompiledTransform();

            xsl.Load(ApplicationSettings.Instance.AppPath + @"\contacts.xslt");
            // AppPath is startup and true app path

            if (webBrowser1.Document != null)
            {
                m_scrollTop  = webBrowser1.Document.Body.ScrollTop;
                m_scrollLeft = webBrowser1.Document.Body.ScrollLeft;
            }

            XsltArgumentList argList = new XsltArgumentList();

            argList.AddParam("systemPath", "", ApplicationSettings.Instance.AppPath);
            argList.AddParam("dataPath", "", ApplicationSettings.Instance.LocalDataPath);
            argList.AddParam("contactFilter", "", m_contactFilter);
            argList.AddParam("scrollTop", "", m_scrollTop.ToString());


            XmlDocument outputDocument = new XmlDocument();

            System.Xml.XPath.XPathNavigator outputNavigator = outputDocument.CreateNavigator();
            using (XmlWriter writer = outputNavigator.AppendChild())
            {
                xsl.Transform(Contacts.Instance.XMLDoc, argList, writer);
            }
            webBrowser1.DocumentText = outputDocument.OuterXml;
        }
예제 #15
0
 public static void FillParams(Param[] @params, System.Xml.XPath.XPathNavigator nav)
 {
     for (int i = 0; i < @params.Length; i++)
     {
         @params[i].Value = nav.GetAttribute(@params[i].Name, "");
     }
 }
예제 #16
0
 public bool Load(System.Xml.XPath.XPathNavigator r)
 {
     if (r.Name == "BoardInformation")
     {
         foreach (Type root_type in BoardPlugin.RootPeiceTypes)
         {
             if (r.Value == root_type.ToString())
             {
                 // call the property to setup other stuff
                 peices = BoardPlugin.PeiceTypes[root_type];
                 if (layers == null)
                 {
                     layers = new LinkedList <Layer>();
                 }
                 layers.Clear();
                 layers.AddLast(background = new Layer(this, peices[0]));
                 background.flags.bRoot    = true;
                 background.peice_instance = background.peice.CreateInstance(null, null);
             }
         }
         if (r.MoveToFirstChild())
         {
             do
             {
                 if (r.Name == "Peice")
                 {
                     foreach (PeiceRepresentation peice in peices)
                     {
                         if (r.Value == peice.GetType().ToString())
                         {
                             r.MoveToFirstChild();
                             peice.Load(r);
                             r.MoveToParent();
                             break;
                         }
                     }
                 }
             }while(r.MoveToNext());
             r.MoveToParent();
         }
         if (r.MoveToFirstAttribute())
         {
             do
             {
                 if (r.Name == "CellWidth")
                 {
                     cell_width = r.ValueAsInt;
                 }
                 if (r.Name == "CellHeight")
                 {
                     cell_height = r.ValueAsInt;
                 }
             } while(r.MoveToNextAttribute());
             r.MoveToParent();
         }
         return(true);
     }
     return(false);
 }
예제 #17
0
        void TLogTranslateItem_OnBeforeRuleProcess(object sender, EventArgs e)
        {
            XmlDocument doc = (XmlDocument)sender;

            System.Xml.XPath.XPathNavigator nav = doc.CreateNavigator();
            Shipping        = doc.SelectSingleNode("CustomerOrder/Customer/@Shipping_Price") == null ? 0 : Convert.ToDouble(doc.SelectSingleNode("CustomerOrder/Customer/@Shipping_Price").Value);
            TaxableShipping = doc.SelectSingleNode("CustomerOrder/Customer/@Taxable_Shipping_Amount") == null ? 0 : Convert.ToDouble(doc.SelectSingleNode("CustomerOrder/Customer/@Taxable_Shipping_Amount").Value);
            Handling        = Convert.ToDouble(nav.Evaluate("sum(//*/@Handling_Charge)"));
        }
예제 #18
0
 bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
 {
     if (r.Name == "listbox_filter")
     {
         inventory_type_filter = r.Value;
         return(true);
     }
     return(false);
 }
예제 #19
0
파일: WavePlayer.cs 프로젝트: d3x0r/xperdex
 public bool Load(System.Xml.XPath.XPathNavigator r)
 {
     if (r.Name == "playsound_file")
     {
         SoundFile = r.Value;
         return(true);
     }
     return(false);
 }
예제 #20
0
        internal static Layer[] GetLayers(System.Xml.XPath.XPathNavigator parentNode, Server server)
        {
            // The incoming parentNode might not be a Layer node, but we assume it is here in
            // order to re-use the Layers property of the Layer class. If parentNode has
            // no Layer children, then the Layers property returns an empty array.
            Layer layerParent = new Layer(parentNode, server);

            return(layerParent.Layers);
        }
 public static System.Xml.XPath.XPathNodeIterator GetNodeIt(System.Xml.XPath.XPathNavigator xnav, string xPath, System.Xml.XmlNamespaceManager nsmgr)
 {
     System.Xml.XPath.XPathExpression xpathExpr = xnav.Compile(xPath);
     if (nsmgr != null)
     {
         xpathExpr.SetContext(nsmgr);
     }
     return(xnav.Select(xpathExpr));
 }
예제 #22
0
        private static System.Xml.XmlNamespaceManager GetReportNamespaceManager(System.Xml.XmlDocument doc)
        {
            if (doc == null)
            {
                throw new System.ArgumentNullException(nameof(doc));
            }

            System.Xml.XmlNamespaceManager nsmgr = new System.Xml.XmlNamespaceManager(doc.NameTable);

            // <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

            if (doc.DocumentElement != null)
            {
                // string strNamespace = doc.DocumentElement.NamespaceURI;
                // System.Console.WriteLine(strNamespace);
                // nsmgr.AddNamespace("dft", strNamespace);

                System.Xml.XPath.XPathNavigator xNav = doc.CreateNavigator();
                while (xNav.MoveToFollowing(System.Xml.XPath.XPathNodeType.Element))
                {
                    System.Collections.Generic.IDictionary <string, string> localNamespaces = xNav.GetNamespacesInScope(System.Xml.XmlNamespaceScope.Local);

                    foreach (System.Collections.Generic.KeyValuePair <string, string> kvp in localNamespaces)
                    {
                        string prefix = kvp.Key;
                        if (string.IsNullOrEmpty(prefix))
                        {
                            prefix = "dft";
                        }

                        nsmgr.AddNamespace(prefix, kvp.Value);
                    } // Next kvp
                }     // Whend



                //System.Xml.XmlNodeList _xmlNameSpaceList = doc.SelectNodes(@"//namespace::*[not(. = ../../namespace::*)]");

                //foreach (System.Xml.XmlNode currentNamespace in _xmlNameSpaceList)
                //{
                //    if (StringComparer.InvariantCultureIgnoreCase.Equals(currentNamespace.LocalName, "xmlns"))
                //    {
                //        nsmgr.AddNamespace("dft", currentNamespace.Value);
                //    }
                //    else
                //        nsmgr.AddNamespace(currentNamespace.LocalName, currentNamespace.Value);

                //}

                return(nsmgr);
            } // End if (doc.DocumentElement != null)

            nsmgr.AddNamespace("dft", "http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition");
            // nsmgr.AddNamespace("dft", "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition");

            return(nsmgr);
        } // End Function GetReportNamespaceManager
예제 #23
0
파일: Timer.cs 프로젝트: d3x0r/xperdex
 public bool Load(System.Xml.XPath.XPathNavigator r)
 {
     if (r.Name == "TimerProperties")
     {
         sound_file = r.Value;
         return(true);
     }
     return(false);
 }
예제 #24
0
 internal static string[] GetStringsInstance(System.Xml.XPath.XPathNavigator node, string selectPattern)
 {
     System.Xml.XPath.XPathNodeIterator iter = node.Select(ExpandPattern(selectPattern));
     string[] retVal = new string[iter.Count];
     while (iter.MoveNext())
     {
         retVal[iter.CurrentPosition - 1] = iter.Current.Value;
     }
     return(retVal);
 }
예제 #25
0
 bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
 {
     if (board == null)
     {
         board        = new Board();
         board.Width  = Width;
         board.Height = Height;
     }
     return(board.Load(r));
 }
예제 #26
0
        public TowerData(System.Xml.XPath.XPathNavigator xml)
        {
            Price = float.Parse(xml.GetAttribute("Price", ""));
            Name  = xml.GetAttribute("Name", "");

            ShutdownHeat = float.Parse(xml.GetAttribute("ShutdownHeat", ""));
            HeatDecay    = float.Parse(xml.GetAttribute("HeatDecay", ""));

            XAML = xml.InnerXml;
        }
예제 #27
0
 bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
 {
     if (r.Name == "POS.plugin")
     {
         xperdex.core.osalot.AssemblyTracker tracker;
         POS.Local.LoadAssembly(r.Value, out tracker);
         return(true);
     }
     return(false);
 }
예제 #28
0
        //
        // .ctor
        //


        public System.Xml.XPath.XPathNavigator TransformData(System.Xml.XPath.XPathNavigator nav, int cacheduration, IPDFDataSource source, PDFDataContext context)
        {
            //Check we have something to use for a transformation.
            if (string.IsNullOrEmpty(this.XSLTPath) && null == this.Transformer)
            {
                return(nav);
            }

            System.Xml.XmlWriter   xmlWriter    = null;
            System.IO.MemoryStream memoryStream = null;
            System.IO.StreamWriter streamWriter = null;
            System.Xml.XmlDocument result       = null;

            System.Xml.XmlDocument output = new System.Xml.XmlDocument();
            try
            {
                System.Xml.Xsl.XslCompiledTransform trans = this.DoGetTransformer(cacheduration, source, context);
                System.Xml.Xsl.XsltArgumentList     args  = this.DoGetArguments(context);
                memoryStream = new System.IO.MemoryStream();
                streamWriter = new System.IO.StreamWriter(memoryStream, Encoding.UTF8);

                System.Xml.XmlWriterSettings writerSettings = CreateWriterSettings();
                xmlWriter = System.Xml.XmlWriter.Create(streamWriter, writerSettings);

                trans.Transform(nav, args, xmlWriter);
                xmlWriter.Flush();
                streamWriter.Flush();

                result = new System.Xml.XmlDocument();
                memoryStream.Position = 0;
                result.Load(memoryStream);
            }
            catch (Exception ex)
            {
                throw new PDFDataException(Errors.CouldNotTransformInputData, ex);
            }
            finally
            {
                if (null != xmlWriter)
                {
                    xmlWriter.Close();
                }
                if (null != streamWriter)
                {
                    streamWriter.Dispose();
                }
                if (null != memoryStream)
                {
                    memoryStream.Dispose();
                }
            }

            return(result.CreateNavigator());
        }
예제 #29
0
 bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
 {
     switch (r.Name)
     {
     case "MILK_Config":
         ConfigName = r.Value;
         canvas.Load(ConfigName);
         return(true);
     }
     return(false);
 }
예제 #30
0
        /// <summary>
        /// Populates a rule condition
        /// </summary>
        /// <param name="ConditionNode"></param>
        /// <returns></returns>
        private RuleCondition PopulateCondition(XmlNode ConditionNode)
        {
            RuleCondition condition = new RuleCondition();

            System.Xml.XPath.XPathNavigator nav = ConditionNode.CreateNavigator();

            condition.Expression  = nav.SelectSingleNode(TranslateExpressionCache.GetXpathExpression("Expression")).InnerXml;
            condition.ID          = ConditionNode.Attributes["id"] == null ? "" : ConditionNode.Attributes["id"].Value.ToString();
            condition.Name        = ConditionNode.Attributes["name"] == null ? "" : ConditionNode.Attributes["name"].Value.ToString();
            condition.Destination = nav.SelectSingleNode(TranslateExpressionCache.GetXpathExpression("Destination")).InnerXml;
            XmlNode DestinationNode = ConditionNode.SelectSingleNode("Destination");

            if (DestinationNode.Attributes != null && DestinationNode.Attributes["format"] != null)
            {
                condition.format = DestinationNode.Attributes["format"].Value;
                condition.type   = Type.GetType(String.Format(DestinationNode.Attributes["type"].Value), true, true);
            }

            //Populate attributes for true values
            XmlNode ConditionTrueNode = ConditionNode.SelectSingleNode("True");

            if (ConditionTrueNode != null)
            {
                condition.TrueValue.Value               = ConditionTrueNode.InnerXml;
                condition.TrueValue.ExpressionSource    = ConditionTrueNode.Attributes["ExpressionSource"] == null ? "" : ConditionTrueNode.Attributes["ExpressionSource"].Value;
                condition.TrueValue.isExpression        = ConditionTrueNode.Attributes["isExpression"] == null ? false : Convert.ToBoolean(ConditionTrueNode.Attributes["isExpression"].Value);
                condition.TrueValue.UseDefault          = ConditionTrueNode.Attributes["UseDefault"] == null ? false : Convert.ToBoolean(ConditionTrueNode.Attributes["UseDefault"].Value);
                condition.TrueValue.ContunueProcessing  = ConditionTrueNode.Attributes["ContinueProcessing"] == null ? true : Convert.ToBoolean(ConditionTrueNode.Attributes["ContinueProcessing"].Value);
                condition.TrueValue.Actionid            = ConditionTrueNode.Attributes["Actionid"] == null ? "" : ConditionTrueNode.Attributes["Actionid"].Value;
                condition.TrueValue.ContinueTransaction = ConditionTrueNode.Attributes["ContinueTransaction"] == null ? true : Convert.ToBoolean(ConditionTrueNode.Attributes["ContinueTransaction"].Value);
            }
            //populate attributes for false values
            XmlNode ConditionFalseNode = ConditionNode.SelectSingleNode("False");

            if (ConditionFalseNode != null)
            {
                condition.FalseValue.Value               = ConditionFalseNode.InnerXml;
                condition.FalseValue.ExpressionSource    = ConditionFalseNode.Attributes["ExpressionSource"] == null ? "" : ConditionFalseNode.Attributes["ExpressionSource"].Value;
                condition.FalseValue.isExpression        = ConditionFalseNode.Attributes["isExpression"] == null ? false : Convert.ToBoolean(ConditionFalseNode.Attributes["isExpression"].Value);
                condition.FalseValue.UseDefault          = ConditionFalseNode.Attributes["UseDefault"] == null ? false : Convert.ToBoolean(ConditionFalseNode.Attributes["UseDefault"].Value);;
                condition.FalseValue.ContunueProcessing  = ConditionFalseNode.Attributes["ContinueProcessing"] == null ? true : Convert.ToBoolean(ConditionFalseNode.Attributes["ContinueProcessing"].Value);
                condition.FalseValue.Actionid            = ConditionFalseNode.Attributes["Actionid"] == null ? "" : ConditionFalseNode.Attributes["Actionid"].Value;
                condition.FalseValue.ContinueTransaction = ConditionFalseNode.Attributes["ContinueTransaction"] == null ? true : Convert.ToBoolean(ConditionFalseNode.Attributes["ContinueTransaction"].Value);
            }

            if (condition.TrueValue != null && condition.FalseValue != null)
            {
                return(condition);
            }
            else
            {
                return(null);
            }
        }