< prev index next >

test/javax/xml/jaxp/unittest/transform/Bug5073477.java

Print this page




  38  * @run testng/othervm -DrunSecMngr=true transform.Bug5073477
  39  * @run testng/othervm transform.Bug5073477
  40  * @summary Test DOMResult.setNextSibling works correctly.
  41  */
  42 @Listeners({jaxp.library.FilePolicy.class})
  43 public class Bug5073477 {
  44 
  45     @Test
  46     public void test1() throws Exception {
  47         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  48         dbf.setNamespaceAware(true);
  49         DocumentBuilder parser = dbf.newDocumentBuilder();
  50         Document dom = parser.parse(Bug5073477.class.getResourceAsStream("Bug5073477.xml"));
  51 
  52         DOMResult r = new DOMResult();
  53 
  54         r.setNode(dom.getDocumentElement());
  55         r.setNextSibling(r.getNode().getFirstChild());
  56     }
  57 }
  58 


  38  * @run testng/othervm -DrunSecMngr=true transform.Bug5073477
  39  * @run testng/othervm transform.Bug5073477
  40  * @summary Test DOMResult.setNextSibling works correctly.
  41  */
  42 @Listeners({jaxp.library.FilePolicy.class})
  43 public class Bug5073477 {
  44 
  45     @Test
  46     public void test1() throws Exception {
  47         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  48         dbf.setNamespaceAware(true);
  49         DocumentBuilder parser = dbf.newDocumentBuilder();
  50         Document dom = parser.parse(Bug5073477.class.getResourceAsStream("Bug5073477.xml"));
  51 
  52         DOMResult r = new DOMResult();
  53 
  54         r.setNode(dom.getDocumentElement());
  55         r.setNextSibling(r.getNode().getFirstChild());
  56     }
  57 }

< prev index next >