Example #1
0
        /// <summary>
        /// Returns the value of the attribute.
        /// If the attribute is not present, returns either null or an empty string, depending on the value
        /// of returnNullForNonexistentAttributes.
        /// </summary>
        internal static string GetAttributeValue(XmlElementWithLocation element, string attributeName, bool returnNullForNonexistentAttributes)
        {
            XmlAttributeWithLocation attribute = (XmlAttributeWithLocation)element.GetAttributeNode(attributeName);

            return(GetAttributeValue(attribute, returnNullForNonexistentAttributes));
        }
Example #2
0
        /// <summary>
        /// Returns the value of the attribute.
        /// If the attribute is not present, returns either null or an empty string, depending on the value
        /// of nullIfNotExists.
        /// </summary>
        internal static string GetAttributeValue(XmlElementWithLocation element, string attributeName, bool nullIfNotExists)
        {
            XmlAttributeWithLocation attribute = (XmlAttributeWithLocation)element.GetAttributeNode(attributeName);

            return(GetAttributeValue(attribute, nullIfNotExists));
        }