/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * Detach this node from all relationships with other nodes. * This is the first step of a move. */ protected void detach() { final DomNode exParent = parent_; basicRemove(); fireRemoval(exParent); }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * Detach this node from all relationships with other nodes. * This is the first step of a move. */ protected void detach() { final DomNode exParent = parent_; basicRemove(); fireRemoval(exParent); }
/** * Quietly removes this node and moves its children to the specified destination. "Quietly" means * that no node events are fired. This method is not appropriate for most use cases. It should * only be used in specific cases for HTML parsing hackery. * * @param destination the node to which this node's children should be moved before this node is removed */ void quietlyRemoveAndMoveChildrenTo(final DomNode destination) { if (destination.getPage() != getPage()) { throw new RuntimeException("Cannot perform quiet move on nodes from different pages."); } for (final DomNode child : getChildren()) { child.basicRemove(); destination.basicAppend(child); } basicRemove(); }
/** * Quietly removes this node and moves its children to the specified destination. "Quietly" means * that no node events are fired. This method is not appropriate for most use cases. It should * only be used in specific cases for HTML parsing hackery. * * @param destination the node to which this node's children should be moved before this node is removed */ void quietlyRemoveAndMoveChildrenTo(final DomNode destination) { if (destination.getPage() != getPage()) { throw new RuntimeException("Cannot perform quiet move on nodes from different pages."); } for (final DomNode child : getChildren()) { child.basicRemove(); destination.basicAppend(child); } basicRemove(); }
/** * Quietly removes this node and moves its children to the specified destination. "Quietly" means * that no node events are fired. This method is not appropriate for most use cases. It should * only be used in specific cases for HTML parsing hackery. * * @param destination the node to which this node's children should be moved before this node is removed */ void quietlyRemoveAndMoveChildrenTo(final DomNode destination) { if (destination.getPage() != getPage()) { throw new RuntimeException("Cannot perform quiet move on nodes from different pages."); } for (DomNode child : getChildren()) { child.basicRemove(); destination.basicAppend(child); } basicRemove(); }
/** * Quietly removes this node and moves its children to the specified destination. "Quietly" means * that no node events are fired. This method is not appropriate for most use cases. It should * only be used in specific cases for HTML parsing hackery. * * @param destination the node to which this node's children should be moved before this node is removed */ void quietlyRemoveAndMoveChildrenTo(final DomNode destination) { if (destination.getPage() != getPage()) { throw new RuntimeException("Cannot perform quiet move on nodes from different pages."); } for (DomNode child : getChildren()) { child.basicRemove(); destination.basicAppend(child); } basicRemove(); }
/** * Quietly removes this node and moves its children to the specified destination. "Quietly" means * that no node events are fired. This method is not appropriate for most use cases. It should * only be used in specific cases for HTML parsing hackery. * * @param destination the node to which this node's children should be moved before this node is removed */ void quietlyRemoveAndMoveChildrenTo(final DomNode destination) { if (destination.getPage() != getPage()) { throw new RuntimeException("Cannot perform quiet move on nodes from different pages."); } for (DomNode child : getChildren()) { child.basicRemove(); destination.basicAppend(child); } basicRemove(); }
/** * Parsing of the children is done, we can move our children to the content. */ @Override protected void onAllChildrenAddedToPage(final boolean postponed) { while (getFirstChild() != null) { final DomNode child = getFirstChild(); child.basicRemove(); domDocumentFragment_.appendChild(child); } } }
/** * Parsing of the children is done, we can move our children to the content. */ @Override protected void onAllChildrenAddedToPage(final boolean postponed) { while (getFirstChild() != null) { final DomNode child = getFirstChild(); child.basicRemove(); domDocumentFragment_.appendChild(child); } } }
/** * Removes this node from all relationships with other nodes. */ public void remove() { final DomNode exParent = parent_; basicRemove(); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).notifyNodeRemoved(this); } if (exParent != null) { fireNodeDeleted(exParent, this); //ask ex-parent to fire event (because we don't have parent now) exParent.fireNodeDeleted(exParent, this); } }
/** * Removes this node from all relationships with other nodes. */ public void remove() { final DomNode exParent = parent_; basicRemove(); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).notifyNodeRemoved(this); } if (exParent != null) { fireNodeDeleted(exParent, this); //ask ex-parent to fire event (because we don't have parent now) exParent.fireNodeDeleted(exParent, this); } }
/** * Removes this node from all relationships with other nodes. */ public void remove() { final DomNode exParent = parent_; basicRemove(); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).notifyNodeRemoved(this); } if (exParent != null) { fireNodeDeleted(exParent, this); //ask ex-parent to fire event (because we don't have parent now) exParent.fireNodeDeleted(exParent, this); } }
newNode.basicRemove();
newNode.basicRemove();