src/test/java/org/jboss/test/util/test/xml/DOMWriterTestCase.java
/** The element does not contain the required attribute ns declaration.
    */
The element does not contain the required attribute ns declaration.
The element does not contain the required attribute ns declaration .
public void testNamespaceCompletionAttribute() throws Exception
   {
      String inStr = 
         "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
          "<env:Header>" +
           "<someHeader env:mustUnderstand='1' xml:lang='en'/>" +
          "</env:Header>" +
          "<env:Body/>" +
         "</env:Envelope>";
      Element env = DOMUtils.parse(inStr);
      Element header = DOMUtils.getFirstChildElement(env);
      Element headerElement = DOMUtils.getFirstChildElement(header);
      String expStr = 
         "<someHeader env:mustUnderstand='1' xml:lang='en' xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'/>";
      String wasStr = DOMWriter.printNode(headerElement, false);
      assertEquals(expStr, wasStr);
   }
public void testNamespaceCompletionAttribute ( ) throws Exception { String inStr = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header>" + "<someHeader env:mustUnderstand='1' xml:lang='en'/>" + "</env:Header>" + "<env:Body/>" + "</env:Envelope>" ; Element env = DOMUtils . parse ( inStr ) ; Element header = DOMUtils . getFirstChildElement ( env ) ; Element headerElement = DOMUtils . getFirstChildElement ( header ) ; String expStr = "<someHeader env:mustUnderstand='1' xml:lang='en' xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'/>" ; String wasStr = DOMWriter . printNode ( headerElement , false ) ; assertEquals ( expStr , wasStr ) ; }
The element does not contain the required attribute ns declaration.
The element does not contain the required attribute ns declaration .