/** * Append the children of another node to this node removing them from the other node . * @param parent the other node whose children to append to this one */ public void appendChildren(Node parent) { Node child = parent.getFirstChild(); if (child == null) { return; } ParentNode another = (ParentNode) parent; if (firstChild == null) { firstChild = child; } else { lastChild.setNextSibling(child); } lastChild = another.lastChild; do { child.setParentNode(this); } while ((child = child.getNextSibling()) != null); another.firstChild = null; another.lastChild = null; }
/** * Append the children of another node to this node removing them from the other node . * @param parent the other node whose children to append to this one */ public void appendChildren(Node parent) { Node child = parent.getFirstChild(); if (child == null) { return; } ParentNode another = (ParentNode) parent; if (firstChild == null) { firstChild = child; } else { lastChild.setNextSibling(child); } lastChild = another.lastChild; do { child.setParentNode(this); } while ((child = child.getNextSibling()) != null); another.firstChild = null; another.lastChild = null; }
/** * Append the children of another node to this node removing them from the other node . * @param parent the other node whose children to append to this one */ public void appendChildren(Node parent) { Node child = parent.getFirstChild(); if (child == null) { return; } ParentNode another = (ParentNode) parent; if (firstChild == null) { firstChild = child; } else { lastChild.setNextSibling(child); } lastChild = another.lastChild; do { child.setParentNode(this); } while ((child = child.getNextSibling()) != null); another.firstChild = null; another.lastChild = null; }
for (;;) { current.visit(this); if ((next = current.getFirstChild()) != null) { current = next; continue;
for (;;) { current.visit(this); if ((next = current.getFirstChild()) != null) { current = next; continue;
for (;;) { current.visit(this); if ((next = current.getFirstChild()) != null) { current = next; continue;