public override object GetValue(object o) { XmlHierarchyData data = o as XmlHierarchyData; if (data != null) { switch (this._name) { case "#Name": return(data._item.Name); case "#Value": return(data._item.Value); case "#InnerText": return(data._item.InnerText); } XmlAttributeCollection attributes = data._item.Attributes; if (attributes != null) { XmlAttribute attribute = attributes[this._name]; if (attribute != null) { return(attribute.Value); } } } return(string.Empty); }
public override object GetValue(object o) { XmlHierarchyData data = o as XmlHierarchyData; if (data != null) { switch (_name) { case "#Name": return(data._item.Name); case "#Value": return(data._item.Value); case "#InnerText": return(data._item.InnerText); default: XmlAttributeCollection attrs = data._item.Attributes; if (attrs != null) { XmlAttribute attr = attrs[_name]; if (attr != null) { return(attr.Value); } } break; } } return(String.Empty); }