Main Page Packages Class Hierarchy Compound List File List Compound Members

# cdatasectiongetdata Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The DOMString attribute of the Text node holds the text that is contained by the CDATA section. Retrieve the last CDATASection node located inside the second child of the second employee and examine its content. Since the CDATASection interface inherits from the CharacterData interface(via the Text node), the "getData()" method can be used to access the CDATA content.

Author:
  NIST , Mary Brady

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

Definition at line 46 of file cdatasectiongetdata.java.

## Constructor & Destructor Documentation

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

| Definition at line 48 of file cdatasectiongetdata.java. References DocumentBuilderSetting::notCoalescing, and DOMTest::setFactory().
    00049                                      {
    00050
    00051       DocumentBuilderSetting[] settings = new DocumentBuilderSetting[] {
    00052 DocumentBuilderSetting.notCoalescing
    00053         };
    00054         DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
    00055         setFactory(testFactory);
    00056
    00057    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 73 of file cdatasectiongetdata.java.
    00073                                 {
    00074       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/cdatasectiongetdata";
    00075    }

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

| Definition at line 76 of file cdatasectiongetdata.java. References DOMTestCase::doMain().
    00076                                           {
    00077         DOMTestCase.doMain(cdatasectiongetdata.class,args);
    00078    }

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

| Reimplemented from DOMTestCase. Definition at line 59 of file cdatasectiongetdata.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00059                                                     {
    00060       Document doc;
    00061       NodeList nameList;
    00062       Node child;
    00063       CDATASection lastChild;
    00064       String data;
    00065       doc = load("staff");
    00066       nameList = doc.getElementsByTagName("name");
    00067       child = nameList.item(1);
    00068       lastChild = (CDATASection)child.getLastChild();
    00069       data = lastChild.getData();
    00070       assertEquals("data","This is an adjacent CDATASection with a reference to a tab &tab;",data);
    00071
    00072    }

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

- cdatasectiongetdata.java