/* */ public void insertChild(XMLElement child, int index) /* */ { /* 422 */ if (child == null) { /* 423 */ throw new IllegalArgumentException("child must not be null"); /* */ } /* 425 */ if ((child.getLocalName() == null) && (!this.children.isEmpty())) { /* 426 */ XMLElement lastChild = (XMLElement)this.children.lastElement(); /* 427 */ if (lastChild.getLocalName() == null) { /* 428 */ lastChild.setContent(lastChild.getContent() + /* 429 */ child.getContent()); /* 430 */ return; /* */ } /* */ } /* 433 */ child.parent = this; /* 434 */ this.children.insertElementAt(child, index); /* */ }
/* */ public void addChild(XMLElement child) /* */ { /* 398 */ if (child == null) { /* 399 */ throw new IllegalArgumentException("child must not be null"); /* */ } /* 401 */ if ((child.getLocalName() == null) && (!this.children.isEmpty())) { /* 402 */ XMLElement lastChild = (XMLElement)this.children.lastElement(); /* */ /* 404 */ if (lastChild.getLocalName() == null) { /* 405 */ lastChild.setContent(lastChild.getContent() + /* 406 */ child.getContent()); /* 407 */ return; /* */ } /* */ } /* 410 */ child.parent = this; /* 411 */ this.children.addElement(child); /* */ }