public void removeElement(int iElemIndex) // todo: use iterator here to remove more than 1 level down { while (this.elements[iElemIndex].childElement(0) != null) { this.elements = XMLUtilities.Remove(this.elements, iElemIndex + 1); } this.elements = XMLUtilities.Remove(this.elements, iElemIndex); for (int i = iElemIndex; i < Array.IndexOf(this.elements, null); i++) { this.elements[i].index = i; } }
public void removeAttribute(string AttributeName, string Value) { if (Array.IndexOf(this.attributes, null) == 0) { this.parseAttributes(); } if (Array.IndexOf(this.attributes, null) != 0) { for (int i = 0; i < Array.IndexOf(this.attributes, null); i++) { if (this.attributes[i, 0] == AttributeName) { this.attributes = XMLUtilities.Remove(this.attributes, i); return; } } } }