NAnt.Core.FrameworkInfo.GetXmlAttributeValue C# (CSharp) 메소드

GetXmlAttributeValue() 개인적인 정적인 메소드

Gets the value of the specified attribute from the specified node.
private static GetXmlAttributeValue ( XmlNode xmlNode, string attributeName ) : string
xmlNode XmlNode The node of which the attribute value should be retrieved.
attributeName string The attribute of which the value should be returned.
리턴 string
        private static string GetXmlAttributeValue(XmlNode xmlNode, string attributeName)
        {
            string attributeValue = null;

            if (xmlNode != null) {
                XmlAttribute xmlAttribute = (XmlAttribute)xmlNode.Attributes.GetNamedItem(attributeName);

                if (xmlAttribute != null) {
                    attributeValue = StringUtils.ConvertEmptyToNull(xmlAttribute.Value);
                }
            }

            return attributeValue;
        }