< prev index next >

test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java

Print this page




  72             e.printStackTrace();
  73             Assert.fail("Exception occured: " + e.getMessage());
  74         }
  75     }
  76 
  77     @Test
  78     public void testStandaloneSet2() {
  79         final String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><prefix:root xmlns=\"\" xmlns:null=\"\"></prefix:root>";
  80 
  81         try {
  82             XMLInputFactory xif = XMLInputFactory.newInstance();
  83             XMLStreamReader r = xif.createXMLStreamReader(new StringReader(xml));
  84             AssertJUnit.assertTrue(r.standaloneSet() && r.isStandalone());
  85 
  86         } catch (Exception e) {
  87             e.printStackTrace();
  88             Assert.fail("Exception occured: " + e.getMessage());
  89         }
  90     }
  91 }
  92 


  72             e.printStackTrace();
  73             Assert.fail("Exception occured: " + e.getMessage());
  74         }
  75     }
  76 
  77     @Test
  78     public void testStandaloneSet2() {
  79         final String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><prefix:root xmlns=\"\" xmlns:null=\"\"></prefix:root>";
  80 
  81         try {
  82             XMLInputFactory xif = XMLInputFactory.newInstance();
  83             XMLStreamReader r = xif.createXMLStreamReader(new StringReader(xml));
  84             AssertJUnit.assertTrue(r.standaloneSet() && r.isStandalone());
  85 
  86         } catch (Exception e) {
  87             e.printStackTrace();
  88             Assert.fail("Exception occured: " + e.getMessage());
  89         }
  90     }
  91 }

< prev index next >