Is there a way to turn on/off xerces "features" via a System Property?
The apache java xerces xml parser has a number of features (http://xerces.apache.org/xerc开发者_如何学编程es-j/features.html) that control the behavior of the parser. Is there a way to turn these on or off by setting a java System Property?
According to the JAXP 1.5 Documentation it is possible:
Found the following example there:
//allow resolution of external schemas
System.setProperty("javax.xml.accessExternalSchema", "file, http");
//this setting will affect all processing after it's set
some processing here
//after it's done, clear the property
System.clearProperty("javax.xml.accessExternalSchema");
精彩评论