Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodeclonetruecopytext Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| nodeclonetruecopytext (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

The "cloneNode(deep)" method does not copy text unless it is deep cloned.(Test for deep=true)

Retrieve the eighth child of the second employee and the "cloneNode(deep)" method with deep=true. The duplicate node returned by the method should copy any text data contained in this node.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4

Definition at line 45 of file nodeclonetruecopytext.java.

## Constructor & Destructor Documentation

nodeclonetruecopytext::nodeclonetruecopytext | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 47 of file nodeclonetruecopytext.java.
    00048  {
    00049       super(factory);
    00050
    00051    }

## Member Function Documentation

String nodeclonetruecopytext::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 84 of file nodeclonetruecopytext.java.
    00084                                 {
    00085       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeclonetruecopytext";
    00086    }

void nodeclonetruecopytext::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 87 of file nodeclonetruecopytext.java. References DOMTestCase::doMain().
    00087                                           {
    00088         DOMTestCase.doMain(nodeclonetruecopytext.class,args);
    00089    }

void nodeclonetruecopytext::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 53 of file nodeclonetruecopytext.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       NodeList elementList;
    00056       Node employeeNode;
    00057       NodeList childList;
    00058       Node childNode;
    00059       Node clonedNode;
    00060       Node lastChildNode;
    00061       String childValue;
    00062       doc = load("staff");
    00063       elementList = doc.getElementsByTagName("employee");
    00064       employeeNode = elementList.item(1);
    00065       childList = employeeNode.getChildNodes();
    00066
    00067         if(
    00068         isIgnoringElementContentWhitespace()
    00069         ) {
    00070         childNode = childList.item(3);
    00071
    00072         }
    00073
    00074                 else {
    00075                         childNode = childList.item(7);
    00076
    00077                 }
    00078         clonedNode = childNode.cloneNode(true);
    00079       lastChildNode = clonedNode.getLastChild();
    00080       childValue = lastChildNode.getNodeValue();
    00081       assertEquals("nodeCloneTrueCopyTextAssert1","35,000",childValue);
    00082
    00083    }

The documentation for this class was generated from the following file:

- nodeclonetruecopytext.java