Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodeclonenodefalse Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 nodeclonenodefalse (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "cloneNode(deep)" method returns a copy of the node only if deep=false.

Retrieve the second employee and invoke the "cloneNode(deep)" method with deep=false. The method should only clone this node. The NodeName and length of the NodeList are checked. The "getNodeName()" method should return "employee" and the "getLength()" method should return 0.

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 47 of file nodeclonenodefalse.java.


Constructor & Destructor Documentation

nodeclonenodefalse::nodeclonenodefalse DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file nodeclonenodefalse.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String nodeclonenodefalse::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 74 of file nodeclonenodefalse.java.

00074                                 {
00075       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeclonenodefalse";
00076    }

void nodeclonenodefalse::main String    args[] [inline, static]
 

Definition at line 77 of file nodeclonenodefalse.java.

References DOMTestCase::doMain().

00077                                           {
00078         DOMTestCase.doMain(nodeclonenodefalse.class,args);
00079    }

void nodeclonenodefalse::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 55 of file nodeclonenodefalse.java.

References DOMTestCase::assertEquals(), and DOMTest::load().

00055                                                     {
00056       Document doc;
00057       NodeList elementList;
00058       Node employeeNode;
00059       Node clonedNode;
00060       String cloneName;
00061       NodeList cloneChildren;
00062       int length;
00063       doc = load("staff");
00064       elementList = doc.getElementsByTagName("employee");
00065       employeeNode = elementList.item(1);
00066       clonedNode = employeeNode.cloneNode(false);
00067       cloneName = clonedNode.getNodeName();
00068       assertEquals("name","employee",cloneName);
00069       cloneChildren = clonedNode.getChildNodes();
00070       length = (int)cloneChildren.getLength();
00071       assertEquals("length",0,length);
00072       
00073    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:59 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001