Package org.w3c.dom

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


  private void assertNoDocType(String docType)
      throws ParseException {
    Document doc = DomParser.makeDocument(DoctypeMaker.parse(docType), null);
    Element el = html(fromString("TEST NODE"));
    doc.appendChild(doc.adoptNode(el));
    assertFalse(Nodes.render(doc.getDoctype(), el, null)
        .matches("[<][!]DOCTYPE"));
  }

  private void assertDocType(String expected, String docType)
View Full Code Here


  private void assertDocType(String expected, String docType)
      throws ParseException {
    Document doc = DomParser.makeDocument(DoctypeMaker.parse(docType), null);
    Element el = html(fromString("TEST NODE"));
    doc.appendChild(doc.adoptNode(el));
    MoreAsserts.assertStartsWith(expected,
        Nodes.render(doc.getDoctype(), el, null));
  }
}
View Full Code Here

      Element processDescriptionElement = XmlUtil.element(processElement, "description");
      if (processDescriptionElement!=null) {
        processElement.removeChild(processDescriptionElement);
      }
      Node clonedDescriptionElement = processUpdateDescriptionElement.cloneNode(true);
      processDocument.adoptNode(clonedDescriptionElement);
      processElement.appendChild(clonedDescriptionElement);
    }
   
    updateActivities(processDocument, processElement, processUpdateElement);
   
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.