Examples of renameNode()

@param n The node to rename. @param namespaceURI The new namespace URI. @param qualifiedName The new qualified name. @return The renamed node. This is either the specified node or the new node that was created to replace the specified node. @exception DOMException NOT_SUPPORTED_ERR: Raised when the type of the specified node is neither ELEMENT_NODE nor ATTRIBUTE_NODE, or if the implementation does not support the renaming of the document element.
WRONG_DOCUMENT_ERR: Raised when the specified node was created from a different document than this document.
NAMESPACE_ERR: Raised if the qualifiedName is a malformed qualified name, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" [XML Namespaces] . Also raised, when the node being renamed is an attribute, if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/". @since DOM Level 3

Examples of org.w3c.dom.Document.renameNode()

    public static void renameNamespaceRecursive(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Document doc = node.getOwnerDocument();
            if (((Element) node).getNamespaceURI().equals(BLUEPRINT_NS)) {
                doc.renameNode(node, SPRING_NS, node.getNodeName());
            }
        }
        NodeList list = node.getChildNodes();
        for (int i = 0; i < list.getLength(); ++i) {
            renameNamespaceRecursive(list.item(i));
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

    public static void renameNamespaceRecursive(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Document doc = node.getOwnerDocument();
            if (node.getNamespaceURI().equals(BLUEPRINT_NS)) {
                doc.renameNode(node, SPRING_NS, node.getLocalName());
            }
        }
        NodeList list = node.getChildNodes();
        for (int i = 0; i < list.getLength(); ++i) {
            renameNamespaceRecursive(list.item(i));
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

   
    public static void renameNamespaceRecursive(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Document doc = node.getOwnerDocument();
            if (((Element) node).getNamespaceURI().equals(BLUEPRINT_NS)) {
                doc.renameNode(node, SPRING_NS, node.getNodeName());
            }
        }
        NodeList list = node.getChildNodes();
        for (int i = 0; i < list.getLength(); ++i) {
            renameNamespaceRecursive(list.item(i));
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

   public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
   {
      elementName = new NameImpl(qname);

      Document owner = domNode.getOwnerDocument();
      domNode = owner.renameNode(domNode, elementName.getURI(), elementName.getQualifiedName());
      element = (Element)domNode;

      return this.completeNamespaceDeclaration();
   }
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

   public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
   {
      elementName = new NameImpl(qname);

      Document owner = domNode.getOwnerDocument();
      domNode = owner.renameNode(domNode, elementName.getURI(), elementName.getQualifiedName());
      element = (Element)domNode;

      return this.completeNamespaceDeclaration();
   }
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

    public static void renameNamespaceRecursive(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Document doc = node.getOwnerDocument();
            if (((Element) node).getNamespaceURI().equals(BLUEPRINT_NS)) {
                doc.renameNode(node, SPRING_NS, node.getLocalName());
            }
        }
        NodeList list = node.getChildNodes();
        for (int i = 0; i < list.getLength(); ++i) {
            renameNamespaceRecursive(list.item(i));
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

/*     */   public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
/*     */   {
/* 147 */     this.elementName = new NameImpl(qname);
/*     */
/* 149 */     Document owner = this.domNode.getOwnerDocument();
/* 150 */     this.domNode = owner.renameNode(this.domNode, this.elementName.getURI(), this.elementName.getQualifiedName());
/* 151 */     this.element = ((Element)this.domNode);
/*     */
/* 153 */     return completeNamespaceDeclaration();
/*     */   }
/*     */
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

   public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
   {
      elementName = new NameImpl(qname);

      Document owner = domNode.getOwnerDocument();
      domNode = owner.renameNode(domNode, elementName.getURI(), elementName.getQualifiedName());
      element = (Element)domNode;

      return this.completeNamespaceDeclaration();
   }
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

    public static void renameNamespaceRecursive(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Document doc = node.getOwnerDocument();
            if (node.getNamespaceURI().equals(BLUEPRINT_NS)) {
                doc.renameNode(node, SPRING_NS, node.getLocalName());
            }
        }
        NodeList list = node.getChildNodes();
        for (int i = 0; i < list.getLength(); ++i) {
            renameNamespaceRecursive(list.item(i));
View Full Code Here

Examples of org.w3c.dom.Document.renameNode()

    public static void renameNamespaceRecursive(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Document doc = node.getOwnerDocument();
            if (node.getNamespaceURI().startsWith(SPRING_NS + "/v")) {
                doc.renameNode(node, SPRING_NS, node.getNodeName());
            }
        }
        NodeList list = node.getChildNodes();
        for (int i = 0; i < list.getLength(); ++i) {
            renameNamespaceRecursive(list.item(i));
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.