public void testCreateElementNS1() throws Throwable {
  Document doc;
  Element element;
  String namespaceURI="http://www.w3.org/DOM/Test/level2";
  String qualifiedName="XML:XML";
  String nodeName;
  String nsURI;
  String localName;
  String prefix;
  String tagName;
  doc=(Document)load("staffNS",builder);
  element=doc.createElementNS(namespaceURI,qualifiedName);
  nodeName=element.getNodeName();
  nsURI=element.getNamespaceURI();
  localName=element.getLocalName();
  prefix=element.getPrefix();
  tagName=element.getTagName();
  assertEquals("documentcreateelementNS01_nodeName","XML:XML",nodeName);
  assertEquals("documentcreateelementNS01_namespaceURI","http://www.w3.org/DOM/Test/level2",nsURI);
  assertEquals("documentcreateelementNS01_localName","XML",localName);
  assertEquals("documentcreateelementNS01_prefix","XML",prefix);
  assertEquals("documentcreateelementNS01_tagName","XML:XML",tagName);
}

public void testCreateElementNS1 ( ) throws Throwable { Document doc ; Element element ; String namespaceURI = "http://www.w3.org/DOM/Test/level2" ; String qualifiedName = "XML:XML" ; String nodeName ; String nsURI ; String localName ; String prefix ; String tagName ; doc = ( Document ) load ( "staffNS" , builder ) ; element = doc . createElementNS ( namespaceURI , qualifiedName ) ; nodeName = element . getNodeName ( ) ; nsURI = element . getNamespaceURI ( ) ; localName = element . getLocalName ( ) ; prefix = element . getPrefix ( ) ; tagName = element . getTagName ( ) ; assertEquals ( "documentcreateelementNS01_nodeName" , "XML:XML" , nodeName ) ; assertEquals ( "documentcreateelementNS01_namespaceURI" , "http://www.w3.org/DOM/Test/level2" , nsURI ) ; assertEquals ( "documentcreateelementNS01_localName" , "XML" , localName ) ; assertEquals ( "documentcreateelementNS01_prefix" , "XML" , prefix ) ; assertEquals ( "documentcreateelementNS01_tagName" , "XML:XML" , tagName ) ; }
runs the test case .
