开发者

Is there a way to turn on/off xerces "features" via a System Property?

开发者 https://www.devze.com 2023-01-23 19:27 出处:网络
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 o

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号