// Removes the attribute node with the specified index from the attribute collection. public virtual XmlNode RemoveAttributeAt(int i) { if (HasAttributes) { return(_attributes.RemoveAt(i)); } return(null); }
// Remove a specified attribute by index. public virtual XmlNode RemoveAttributeAt(int i) { if (attributes != null) { return(attributes.RemoveAt(i)); } else { return(null); } }
static void SortXmlAttributeCollection( XmlAttributeCollection col ) { // Remove, sort, then re-add the attributes to the collection. if (sort_attr && col != null && col.Count > 0) { List<XmlAttribute> attrs = new List<XmlAttribute>(col.Count); for (int i = col.Count - 1; i >= 0; i--) { attrs.Add(col[i]); col.RemoveAt(i); } SortAttributeList(attrs); for (int i = 0; i < attrs.Count; i++) { col.Append(attrs[i]); } } }