src/test/java/org/jboss/test/util/test/xml/DOMWriterTestCase.java
// [JBWS-762] DOMUtils.parse skips peer comments on Document node
[JBWS-762] DOMUtils.parse skips peer comments on Document node
[ JBWS - 762 ] DOMUtils . parse skips peer comments on Document node
public void testDocumentComments() throws Exception
   {
      String expStr = 
         "<?xml version='1.0' encoding='UTF-8'?>" +
         "<!-- Some root comment -->" +
         "<root>" +
          "<!-- Some element comment -->" +
          "<element>some value</element>" +
         "</root>";
      Document doc = DOMUtils.parse(expStr).getOwnerDocument();
      StringWriter strwr = new StringWriter();
      new DOMWriter(strwr, "UTF-8").print(doc);
      String wasStr = strwr.toString();
      assertEquals(expStr, wasStr);
   }
public void testDocumentComments ( ) throws Exception { String expStr = "<?xml version='1.0' encoding='UTF-8'?>" + "<!-- Some root comment -->" + "<root>" + "<!-- Some element comment -->" + "<element>some value</element>" + "</root>" ; Document doc = DOMUtils . parse ( expStr ) . getOwnerDocument ( ) ; StringWriter strwr = new StringWriter ( ) ; new DOMWriter ( strwr , "UTF-8" ) . print ( doc ) ; String wasStr = strwr . toString ( ) ; assertEquals ( expStr , wasStr ) ; }
[JBWS-762] DOMUtils.parse skips peer comments on Document node
[ JBWS - 762 ] DOMUtils . parse skips peer comments on Document node