< prev index next >

test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java

Print this page




  63             }
  64         }
  65     }
  66 
  67     @Test
  68     public void testWorkaround() {
  69         Document doc;
  70         try {
  71             doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  72             Element el = doc.createElement("x");
  73             doc.appendChild(el);
  74             DOMImplementationLS ls = (DOMImplementationLS) doc.getImplementation().getFeature("LS", "3.0");
  75             System.out.println(ls.createLSSerializer().writeToString(doc));
  76         } catch (ParserConfigurationException ex) {
  77             ex.printStackTrace();
  78             Assert.fail(ex.getMessage());
  79         }
  80     }
  81 
  82 }
  83 


  63             }
  64         }
  65     }
  66 
  67     @Test
  68     public void testWorkaround() {
  69         Document doc;
  70         try {
  71             doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  72             Element el = doc.createElement("x");
  73             doc.appendChild(el);
  74             DOMImplementationLS ls = (DOMImplementationLS) doc.getImplementation().getFeature("LS", "3.0");
  75             System.out.println(ls.createLSSerializer().writeToString(doc));
  76         } catch (ParserConfigurationException ex) {
  77             ex.printStackTrace();
  78             Assert.fail(ex.getMessage());
  79         }
  80     }
  81 
  82 }

< prev index next >