Package org.w3c.dom

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


                            content = el;
                            el = content.getOwnerDocument().createElementNS(null, "status");
                            content.appendChild(el);
                            content = el;
                            el = content.getOwnerDocument().createElementNS(null, "visible");
                            content.appendChild(el);
                            content = el;
                            t = content.getOwnerDocument().createTextNode("true");
                            content.appendChild(t);
                        } else {
                            // is any of them visible?
View Full Code Here


                            content = el;
                            el = content.getOwnerDocument().createElementNS(null, "visible");
                            content.appendChild(el);
                            content = el;
                            t = content.getOwnerDocument().createTextNode("true");
                            content.appendChild(t);
                        } else {
                            // is any of them visible?
                            boolean found;
                            boolean origVisible = DOMUtil.getValueAsBooleanOf(configElement, "status/visible");
                            int si, sl;
View Full Code Here

                                }
                                // remove old childs
                                while (visibleElem.hasChildNodes() == true) {
                                    visibleElem.removeChild(visibleElem.getFirstChild());
                                }
                                visibleElem.appendChild(statusElem.getOwnerDocument().createTextNode("true"));
                            }
                        }
                    }
                }
            }
View Full Code Here

                        }
                        childs = currentDelta.getChildNodes();
                        max = childs.getLength();
                        for(index = 0; index < max; index++) {
                            if (childs.item(index).getNodeType() == Node.TEXT_NODE) {
                                currentProfile.appendChild(currentProfile.getOwnerDocument()
                                     .createTextNode(childs.item(index).getNodeValue()));
                            }
                        }
                    }
                } else {
View Full Code Here

            Element el;
            for(int i = oldNumber + 1; i <= columnNumber; i++) {
                newColumn = doc.createElementNS(null, "column");
                newColumn.setAttributeNS(null, "position", ""+i);
                miscNodes[7+i] = newColumn;
                contentNode.appendChild(newColumn);
                el = doc.createElementNS(null, "width");
                el.appendChild(doc.createTextNode("5%"));
                newColumn.appendChild(el);
                el = doc.createElementNS(null, "coplets");
                newColumn.appendChild(el);
View Full Code Here

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

      // System.out.println(newNode.getNodeName());
    }
    else if (null != m_docFrag)
    {
View Full Code Here

            if (deep) {
                for (Node n = importedNode.getFirstChild();
                     n != null;
                     n = n.getNextSibling()) {
                    result.appendChild(importNode(n, true));
                }
            }

            return result;
        }
View Full Code Here

     */
    public void addElement(Document document, String xpath, String value) throws Exception {
        XPath xp = new XPath(xpath);
        Node parent = createNode(document, xp.getParent());
        Element element = dpf.newElementNode(document, xp.getName());
        parent.appendChild(element);

        if (value != null) {
            element.appendChild(dpf.newTextNode(element.getOwnerDocument(), value));
        }
    }
View Full Code Here

            if (xpath.getType() == Node.ATTRIBUTE_NODE) {
                ((Element) parentNode).setAttribute(xpath.getNameWithoutPredicates(), "null");
                node = ((Element) parentNode).getAttributeNode(xpath.getNameWithoutPredicates());
            } else {
                node = dpf.newElementNode(document, xpath.getNameWithoutPredicates());
                parentNode.appendChild(node);
            }
        }

        return node;
    }
View Full Code Here

    Node currentNode = m_currentNode;

    if (null != currentNode)
    {
      currentNode.appendChild(newNode);

      // System.out.println(newNode.getNodeName());
    }
    else if (null != m_docFrag)
    {
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.