Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.xml.stream.isValidating

 
opper bolt
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trying out this piece of StAX code from cafeconleche:
XMLInputFactory factory = XMLInputFactory.newInstance();
if (!factory.isPropertySupported("javax.xml.stream.isValidating")) {
System.err.println("This StAX implementation does not support validation.");
return;
}
factory.setProperty("javax.xml.stream.isValidating", Boolean.TRUE);
=> Exception in thread "main" java.lang.IllegalArgumentException: true value of isValidating not supported

That's a bug, no? Or is there an oracle lawyer that would say that an immutably false property is considered supported?
This is java 1.6.0_18.

TNX,

jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic