< prev index next >

test/javax/xml/jaxp/unittest/dom/Bug6520131.java

Print this page




  66                 }
  67             });
  68 
  69             // add text element
  70             Element textElement = document.createElementNS("", "Text");
  71             Text text = document.createTextNode(string);
  72             textElement.appendChild(text);
  73             document.appendChild(textElement);
  74 
  75             // normalize document
  76             document.normalizeDocument();
  77 
  78             Assert.fail("Invalid character exception not thrown");
  79         } catch (ParserConfigurationException e) {
  80             Assert.fail("Unable to configure parser");
  81         } catch (RuntimeException e) {
  82             // This exception is expected!
  83         }
  84     }
  85 }
  86 


  66                 }
  67             });
  68 
  69             // add text element
  70             Element textElement = document.createElementNS("", "Text");
  71             Text text = document.createTextNode(string);
  72             textElement.appendChild(text);
  73             document.appendChild(textElement);
  74 
  75             // normalize document
  76             document.normalizeDocument();
  77 
  78             Assert.fail("Invalid character exception not thrown");
  79         } catch (ParserConfigurationException e) {
  80             Assert.fail("Unable to configure parser");
  81         } catch (RuntimeException e) {
  82             // This exception is expected!
  83         }
  84     }
  85 }

< prev index next >