Code example for Vector

Methods: add, remove

0
    public void add(XMLNode child) {
        if (child.mParent != null) {
            child.mParent.remove(child);
        } 
        child.mParent = this;
        mChildren.add(child);
    } 
 
    public void remove(XMLNode child) {
        if (child.mParent == this) {
            mChildren.remove(child);
            child.mParent = null;
        } 
    } 
 
    public String getName() {
        return mName;
    } 
 
    public int getChildCount() { 
        return mChildren.size();