} // GetXmlAttribute(reader, attributeName) /// <summary> /// Get xml int value, will return 0 if it does not exists or /// isn't an int. Will use the "value" attribute. /// </summary> /// <param name="reader">Reader</param> /// <returns>Float</returns> public static int GetXmlIntValue(XmlReader reader) { string str = reader.GetAttribute("value"); int ret = 0; //int.TryParse(str, out ret); if (CStringHelper.IsNumericInt(str)) { ret = Convert.ToInt32(str); } return(ret); } // GetXmlIntValue(reader)
} // GetXmlAttribute(node, attributeName) /// <summary> /// Get xml int value, will return 0 if it does not exists or /// isn't an int. Will use the "value" attribute. /// </summary> /// <param name="node">Node</param> /// <returns>Float</returns> public static int GetXmlIntValue(XmlNode node) { string str = GetXmlAttribute(node, "value"); int ret = 0; //int.TryParse(str, out ret); if (CStringHelper.IsNumericInt(str)) { ret = Convert.ToInt32(str); } return(ret); } // GetXmlIntValue(node)