src/test/java/org/jboss/test/util/test/xml/DOMWriterTestCase.java
/** The element does not contain the required ns declaration, the child does.
    */
The element does not contain the required ns declaration, the child does.
The element does not contain the required ns declaration the child does .
public void testNamespaceCompletionThree() throws Exception
   {
      String inStr = 
         "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
          "<env:Body>" +
           "<ns1:rpc xmlns:ns1='http://somens'>" +
            "<ns1:param1/>" +
            "<ns1:param2/>" +
           "</ns1:rpc>" +
          "</env:Body>" +
         "</env:Envelope>";
      Element env = DOMUtils.parse(inStr);
      Element body = DOMUtils.getFirstChildElement(env);
      String expStr = 
         "<env:Body xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
          "<ns1:rpc xmlns:ns1='http://somens'>" +
           "<ns1:param1/>" +
           "<ns1:param2/>" +
          "</ns1:rpc>" +
         "</env:Body>";
      String wasStr = DOMWriter.printNode(body, false);
      assertEquals(expStr, wasStr);
   }
public void testNamespaceCompletionThree ( ) throws Exception { String inStr = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Body>" + "<ns1:rpc xmlns:ns1='http://somens'>" + "<ns1:param1/>" + "<ns1:param2/>" + "</ns1:rpc>" + "</env:Body>" + "</env:Envelope>" ; Element env = DOMUtils . parse ( inStr ) ; Element body = DOMUtils . getFirstChildElement ( env ) ; String expStr = "<env:Body xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<ns1:rpc xmlns:ns1='http://somens'>" + "<ns1:param1/>" + "<ns1:param2/>" + "</ns1:rpc>" + "</env:Body>" ; String wasStr = DOMWriter . printNode ( body , false ) ; assertEquals ( expStr , wasStr ) ; }
The element does not contain the required ns declaration, the child does.
The element does not contain the required ns declaration the child does .