/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; DocumentType docType; String docTypeName; String nodeValue; doc = (Document) load("staff", false); docType = doc.getDoctype(); assertNotNull("docTypeNotNull", docType); docTypeName = docType.getName(); if (("image/svg+xml".equals(getContentType()))) { assertEquals("doctypeNameSVG", "svg", docTypeName); } else { assertEquals("doctypeName", "staff", docTypeName); } nodeValue = docType.getNodeValue(); assertNull("initiallyNull", nodeValue); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { String namespaceURI = "http://ecommerce.org/schema"; String qualifiedName = "prefix:myDoc"; String publicId = "http://www.localhost.com"; String systemId = "myDoc.dtd"; Document doc; DOMImplementation domImpl; DocumentType newType = null; String nodeName; String nodeValue; doc = (Document) load("staffNS", false); domImpl = doc.getImplementation(); newType = domImpl.createDocumentType(qualifiedName, publicId, systemId); nodeName = newType.getNodeName(); assertEquals("nodeName", "prefix:myDoc", nodeName); nodeValue = newType.getNodeValue(); assertNull("nodeValue", nodeValue); } /**
nodeValue = docType.getNodeValue(); assertNull("nodeValue", nodeValue); attributes = docType.getAttributes();