示例#1
0
 public static string GetAttributeValue(XmlNode node, string attributeName, NameCaseSensitive caseSensitive)
 {
     if (caseSensitive == NameCaseSensitive.No)
     {
         foreach (XmlAttribute attr in node.Attributes)
         {
             if (attr.Name.Equals(attributeName, StringComparison.CurrentCultureIgnoreCase))
             {
                 return(attr.Value);
             }
         }
     }
     return(GetAttributeValue(node, attributeName, string.Empty));
 }
 public static string GetAttributeValue(XmlNode node, string attributeName, NameCaseSensitive caseSensitive)
 {
     if (caseSensitive == NameCaseSensitive.No)
     {
         foreach (XmlAttribute attr in node.Attributes)
         {
             if (attr.Name.Equals(attributeName, StringComparison.CurrentCultureIgnoreCase))
             {
                 return attr.Value;
             }
         }
     }
     return GetAttributeValue(node, attributeName, string.Empty);
 }