private String GetAttribute(XmlNode node, String key, String defaultValue) { XmlAttribute att = node.Attributes[key]; if (att == null) { return defaultValue; } return att.Value; } }