Package org.w3c.dom

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


      Node node = getOriginalNode( signedDocument );

      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setNamespaceAware( true );
      Document originalDoc = documentBuilderFactory.newDocumentBuilder().newDocument();
      originalDoc.appendChild( originalDoc.adoptNode( node ) );
      return originalDoc;
    } catch ( ParserConfigurationException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here


      Node node = getOriginalNode( signedDocument );

      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setNamespaceAware( true );
      Document originalDoc = documentBuilderFactory.newDocumentBuilder().newDocument();
      originalDoc.appendChild( originalDoc.adoptNode( node ) );
      return originalDoc;
    } catch ( ParserConfigurationException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

      Node node = getOriginalNode( signedDocument );

      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setNamespaceAware( true );
      Document originalDoc = documentBuilderFactory.newDocumentBuilder().newDocument();
      originalDoc.appendChild( originalDoc.adoptNode( node ) );
      return originalDoc;
    } catch ( ParserConfigurationException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

   private String nameSpace;

   PolicyAssertion(Element element)
   {
      Document doc = DOMUtils.getOwnerDocument();
      this.assertionElement = (Element)doc.adoptNode(element);
      this.nameSpace = assertionElement.getNamespaceURI();
   }

   public Element getElement()
   {
View Full Code Here

      Node node = getOriginalNode( signedDocument );

      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setNamespaceAware( true );
      Document originalDoc = documentBuilderFactory.newDocumentBuilder().newDocument();
      originalDoc.appendChild( originalDoc.adoptNode( node ) );
      return originalDoc;
    } catch ( ParserConfigurationException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

/*     */     }
/*     */
/* 260 */     childElement.detachNode();
/*     */
/* 264 */     Document newDocument = DOMUtils.getDocumentBuilder().newDocument();
/* 265 */     Node adoptedElement = newDocument.adoptNode(childElement.domNode);
/* 266 */     newDocument.appendChild(adoptedElement);
/*     */
/* 268 */     return newDocument;
/*     */   }
/*     */
View Full Code Here

    root.setAttribute("timeStamp", sTimestamp);
     
    // echo the request, complete the response
    Element elEcho = responseDom.createElementNS(CswNamespaces.URI_CSW,"EchoedRequest");
    Node ndRequest = requestDom.getFirstChild().cloneNode(true);
    elEcho.appendChild(responseDom.adoptNode(ndRequest));
    root.appendChild(elEcho);
    response.setResponseXml(XmlIoUtil.domToString(responseDom));
  }
   
}
View Full Code Here

/*    */   private String nameSpace;
/*    */
/*    */   PolicyAssertion(Element element)
/*    */   {
/* 59 */     Document doc = DOMUtils.getOwnerDocument();
/* 60 */     this.assertionElement = ((Element)doc.adoptNode(element));
/* 61 */     this.nameSpace = this.assertionElement.getNamespaceURI();
/*    */   }
/*    */
/*    */   public Element getElement()
/*    */   {
View Full Code Here

      childElement.detachNode();

      // child element's owner document might be shared with other elements;
      // we have to create a separate document for returning to our caller
      Document newDocument = DOMUtils.getDocumentBuilder().newDocument();
      Node adoptedElement = newDocument.adoptNode(childElement.domNode);
      newDocument.appendChild(adoptedElement);

      return newDocument;
   }
View Full Code Here

      Node node = getOriginalNode( signedDocument );

      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setNamespaceAware( true );
      Document originalDoc = documentBuilderFactory.newDocumentBuilder().newDocument();
      originalDoc.appendChild( originalDoc.adoptNode( node ) );
      return originalDoc;
    } catch ( ParserConfigurationException e ) {
      throw new RuntimeException( e );
    }
  }
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.