Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

noderemovechildoldchildnonexistent Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "removeChild(oldChild)" method raises a NOT_FOUND_ERR DOMException if the old child is not a child of this node.

Retrieve the second employee and attempt to remove a node that is not one of its children. An attempt to remove such a node should raise the desired exception.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NOT_FOUND_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1734834066')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NOT_FOUND_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066

Definition at line 48 of file noderemovechildoldchildnonexistent.java.


Constructor & Destructor Documentation

noderemovechildoldchildnonexistent::noderemovechildoldchildnonexistent DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 50 of file noderemovechildoldchildnonexistent.java.

00051  {
00052       super(factory);
00053 
00054    }


Member Function Documentation

String noderemovechildoldchildnonexistent::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 80 of file noderemovechildoldchildnonexistent.java.

00080                                 {
00081       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/noderemovechildoldchildnonexistent";
00082    }

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

Definition at line 83 of file noderemovechildoldchildnonexistent.java.

References DOMTestCase::doMain().

00083                                           {
00084         DOMTestCase.doMain(noderemovechildoldchildnonexistent.class,args);
00085    }

void noderemovechildoldchildnonexistent::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 56 of file noderemovechildoldchildnonexistent.java.

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

00056                                                     {
00057       Document doc;
00058       Node oldChild;
00059       NodeList elementList;
00060       Node elementNode;
00061       Node removedChild;
00062       doc = load("staff");
00063       oldChild = doc.createElement("oldChild");
00064       elementList = doc.getElementsByTagName("employee");
00065       elementNode = elementList.item(1);
00066       
00067         {
00068                 boolean success = false;
00069                 try {
00070                         removedChild = elementNode.removeChild(oldChild);
00071       
00072                 }
00073                 catch(DOMException ex) {
00074                         success = (ex.code == DOMException.NOT_FOUND_ERR);
00075                 }
00076                 assertTrue("nodeRemoveChildOldChildNonexistentAssert1",success);
00077         }
00078 
00079    }


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