Java 教程是为 JDK 8 编写的。本页中描述的示例和实践未利用在后续版本中引入的改进。
StAX, JSR 173, does not support FSP. The StAX implementation in the JDK however, supports the new limit properties and their corresponding system properties. This means that, while there is no FSP to turn on and off the limits, the limits and system properties described work exactly the same.
For compatibility, the StAX specific properties always take effect before the new JAXP limits. The SupportDTD property when set to false, for example, causes an exception to be thrown when an input file contains an Entity reference. Therefore, the addition of the new limits will have no effect for applications that use the SupportDTD property to disable the DTD.