documentcreateattributeNS01public final class documentcreateattributeNS01 extends org.w3c.domts.DOMTestCase The method createAttributeNS creates an attribute of the given qualified name and namespace URI
Invoke the createAttributeNS method on this Document object with a null
namespaceURI, and a qualifiedName without a prefix. This should return a valid Attr
node object. |
Constructors Summary |
---|
public documentcreateattributeNS01(org.w3c.domts.DOMTestDocumentBuilderFactory factory)Constructor.
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staffNS", false);
|
Methods Summary |
---|
public java.lang.String | getTargetURI()Gets URI that identifies the test.
return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS01";
| public static void | main(java.lang.String[] args)Runs this test from the command line.
DOMTestCase.doMain(documentcreateattributeNS01.class, args);
| public void | runTest()Runs the test case.
Document doc;
Attr attribute;
String namespaceURI = null;
String qualifiedName = "test";
String name;
String nodeName;
String nodeValue;
doc = (Document) load("staffNS", false);
attribute = doc.createAttributeNS(namespaceURI, qualifiedName);
nodeName = attribute.getNodeName();
nodeValue = attribute.getNodeValue();
assertEquals("documentcreateattributeNS01", "test", nodeName);
|
|