public boolean equalsXMLElement(IXMLElement elt) {
        if (! this.name.equals(elt.getName())) {
            return false;
        }
        if (this.attributes.size() != elt.getAttributeCount()) {
            return false;
        }
        Iterator enm = this.attributes.iterator();
        while (enm.hasNext()) {
            XMLAttribute attr = (XMLAttribute) enm.next();
            if (! elt.hasAttribute(attr.getName(), attr.getNamespace())) {
                return false;
            }
            String value = elt.getAttribute(attr.getName(),
                                            attr.getNamespace(),
                                            null);
            if (! attr.getValue().equals(value)) {
                return false;
            }
            String type = elt.getAttributeType(attr.getName(),
                                               attr.getNamespace());
            if (! attr.getType().equals(type)) {
                return false;
            }
        }
        if (this.children.size() != elt.getChildrenCount()) {
            return false;
        }
        for (int i = 0; i < this.children.size(); i++) {
            IXMLElement child1 = this.getChildAtIndex(i);
            IXMLElement child2 = elt.getChildAtIndex(i);

            if (! child1.equalsXMLElement(child2)) {
                return false;
            }
        }
        return true;
    }