00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 package org.w3c.domts.level1.core;
00021
00022 import org.w3c.dom.*;
00023 import org.w3c.dom.html.*;
00024 import org.w3c.dom.events.*;
00025 import org.w3c.domts.*;
00026 import javax.xml.parsers.*;
00027 import java.util.*;
00028
00029
00030
00047 public class nodecdatasectionnodevalue extends DOMTestCase {
00048
00049 public nodecdatasectionnodevalue(DOMTestDocumentBuilderFactory factory)
00050 throws DOMTestIncompatibleException {
00051
00052 DocumentBuilderSetting[] settings = new DocumentBuilderSetting[] {
00053 DocumentBuilderSetting.notCoalescing
00054 };
00055 DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
00056 setFactory(testFactory);
00057
00058 }
00059
00060 public void runTest() throws java.lang.Throwable {
00061 Document doc;
00062 NodeList elementList;
00063 Element cdataName;
00064 NodeList cdataNode;
00065 Node child;
00066 String cdataNodeValue;
00067 doc = load("staff");
00068 elementList = doc.getElementsByTagName("name");
00069 cdataName = (Element)elementList.item(1);
00070 cdataNode = cdataName.getChildNodes();
00071 child = cdataNode.item(1);
00072 cdataNodeValue = child.getNodeValue();
00073 assertEquals("value","This is a CDATASection with EntityReference number 2 &ent2;",cdataNodeValue);
00074
00075 }
00076 public String getTargetURI() {
00077 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodecdatasectionnodevalue";
00078 }
00079 public static void main(String[] args) {
00080 DOMTestCase.doMain(nodecdatasectionnodevalue.class,args);
00081 }
00082 }