Main Page Packages Class Hierarchy Compound List File List Compound Members

# documentcreatetextnode Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "createTextNode(data)" method creates a Text node given the specfied string. Retrieve the entire DOM document and invoke its "createTextNode(data)" method. It should create a new Text node whose "data" is the specified string. The NodeName and NodeType are also checked.

Author:
  NIST , Mary Brady

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

Definition at line 44 of file documentcreatetextnode.java.

## Constructor & Destructor Documentation

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

| Definition at line 46 of file documentcreatetextnode.java.
    00047  {
    00048       super(factory);
    00049
    00050    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 68 of file documentcreatetextnode.java.
    00068                                 {
    00069       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentcreatetextnode";
    00070    }

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

| Definition at line 71 of file documentcreatetextnode.java. References DOMTestCase::doMain().
    00071                                           {
    00072         DOMTestCase.doMain(documentcreatetextnode.class,args);
    00073    }

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

| Reimplemented from DOMTestCase. Definition at line 52 of file documentcreatetextnode.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00052                                                     {
    00053       Document doc;
    00054       Text newTextNode;
    00055       String newTextName;
    00056       String newTextValue;
    00057       int newTextType;
    00058       doc = load("staff");
    00059       newTextNode = doc.createTextNode("This is a new Text node");
    00060       newTextValue = newTextNode.getNodeValue();
    00061       assertEquals("value","This is a new Text node",newTextValue);
    00062       newTextName = newTextNode.getNodeName();
    00063       assertEquals("name","#text",newTextName);
    00064       newTextType = (int)newTextNode.getNodeType();
    00065       assertEquals("type",3,newTextType);
    00066
    00067    }

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

- documentcreatetextnode.java