Package org.w3c.dom

Examples of org.w3c.dom.Node.insertBefore()


    public void comment(char[] ch, int start, int length) {
        final Node last = nodeStk.peek();
        Comment comment = document.createComment(new String(ch, start, length));
        if (comment != null) {
            if (last == root && nextSibling != null) {
                last.insertBefore(comment, nextSibling);
            } else {
                last.appendChild(comment);
            }

            lastSibling = comment;
View Full Code Here


            orgRow.removeAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_ROWS_REPEATED);
        }

        Node parentNode = orgRow.getParentNode();
        parentNode.insertBefore(splitRow, orgRow);

        return splitRow;
    }
}
View Full Code Here

            orgRow.removeAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_ROWS_REPEATED);
        }

        Node parentNode = orgRow.getParentNode();
        parentNode.insertBefore(splitRow, orgRow);

        return splitRow;
    }
}
View Full Code Here

     @param  newNode  <code>Node</code> to insert.
     */
    protected void insertNode(Node oldNode, Node newNode) {
        Node clonedNode = XmlUtil.deepClone(oldNode, newNode);
        Node parent = oldNode.getParentNode();
        parent.insertBefore(clonedNode, oldNode);
    }


    /**
     *  Replace <code>Element</code>.
View Full Code Here

            orgCell.removeAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED);
        }

        Node parentNode = orgCell.getParentNode();
        parentNode.insertBefore(splitCell, orgCell);

        return splitCell;
    }

View Full Code Here

     @param  newNode  <code>Node</code> to insert.
     */
    protected void insertNode(Node oldNode, Node newNode) {
        Node clonedNode = XmlUtil.deepClone(oldNode, newNode);
        Node parent = oldNode.getParentNode();
        parent.insertBefore(clonedNode, oldNode);
    }


    /**
     *  Replace <code>Element</code>.
View Full Code Here

            orgCell.removeAttribute(
              OfficeConstants.ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED);
        }

        Node parentNode = orgCell.getParentNode();
        parentNode.insertBefore(splitCell, orgCell);

        return splitCell;
    }

View Full Code Here

                    (fStartContainer.getNodeValue()).substring(0,fStartOffset));
                Node next = fStartContainer.getNextSibling();
                if (next != null) {
                    Node parent = fStartContainer.getParentNode();
                    if (parent !=  null) {
                        parent.insertBefore(newNode, next);
                        parent.insertBefore(cloneCurrent, next);
                    }
                } else {
                    Node parent = fStartContainer.getParentNode();
                    if (parent != null) {
View Full Code Here

                Node next = fStartContainer.getNextSibling();
                if (next != null) {
                    Node parent = fStartContainer.getParentNode();
                    if (parent !=  null) {
                        parent.insertBefore(newNode, next);
                        parent.insertBefore(cloneCurrent, next);
                    }
                } else {
                    Node parent = fStartContainer.getParentNode();
                    if (parent != null) {
                        parent.appendChild(newNode);
View Full Code Here

    Node currentNode = m_currentNode;

    if (null != currentNode)
    {
      if (currentNode == m_root && m_nextSibling != null)
        currentNode.insertBefore(newNode, m_nextSibling);
      else
        currentNode.appendChild(newNode);

      // System.out.println(newNode.getNodeName());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.