public void addChild(IXMLElement child) {
        if (child == null) {
            throw new IllegalArgumentException("child must not be null");
        }
        if ((child.getName() == null) && (! this.children.isEmpty())) {
            IXMLElement lastChild = (IXMLElement) this.children.get(this.children.size() - 1);

            if (lastChild.getName() == null) {
                lastChild.setContent(lastChild.getContent()
                                     + child.getContent());
                return;
            }
        }
        ((XMLElement)child).parent = this;
        this.children.add(child);
    }