Apache.NMS.Test.NMSTestSupport.GetNodeValueAttribute C# (CSharp) Method

GetNodeValueAttribute() protected static method

protected static GetNodeValueAttribute ( XmlElement parentNode, string nodeName, string dflt ) : string
parentNode System.Xml.XmlElement
nodeName string
dflt string
return string
        protected static string GetNodeValueAttribute(XmlElement parentNode, string nodeName, string dflt)
        {
            XmlElement node = (XmlElement) parentNode.SelectSingleNode(nodeName);
            string val;

            if(null != node)
            {
                val = node.GetAttribute("value");
            }
            else
            {
                val = dflt;
            }

            return val;
        }