code: public boolean removeChild(Node node) throws ChildNodeException {
      Node currNode = getFirstChild();
      boolean rc = false;
  
      if (!allowChildren) {
        throw new ChildNodeException();
      }
  
      if (node != null && !isLeaf()) {
        // Is this the first and only child
        if (node == currNode && node == currNode.getNextSibling()) {
          setFirstChild(null);
          rc = true;
        } else {
          // Verify that this Node is a child here
          do {
            if (currNode == node) {
              // Remove this child
              if (node.getPrevSibling() != null) {
                node.getPrevSibling().setNextSibling(node.getNextSibling());
              }
              if (node == getFirstChild()) {
                setFirstChild(node.getNextSibling());
              }
  
              rc = true;
  
              // do not release. Item.resolve expects the 
              // pointers to be intact after a remove
              //node.release();
              break;
            }
            currNode = currNode.getNextSibling();
          } while (currNode != getFirstChild());
        }
      }
  
      return rc;
    }
docs: Searches for an immediate child node and if found removes it from the linked-list of children.
  
  @param node Node to be searched for and removed if found.