public abstract class Schema extends Object
此对象表示可以检查/强制执行对XML文档的一组约束。
一个Schema
对象是线程安全的,应用是鼓励分享过许多许多线程分析器。
一个Schema
对象是不可变的在这个意义上,它不应该一旦建立其变化约束集。换句话说,如果一个应用程序验证了相同的文件,对同一Schema
两次,它总是产生相同的结果。
一个Schema
对象通常是由SchemaFactory
。
两种验证器可以从Schema
对象创建。一是Validator
,它提供了高水平的验证操作,包括典型的使用案例。另一个是ValidatorHandler
,上运行的萨克斯更好的模块化。
本规范不完善Object.equals(java.lang.Object)
方法。换句话说,如果你分析同一模式的两倍,你还是可能会!schemaA.equals(schemaB)
。
Modifier | Constructor and Description |
---|---|
protected |
Schema()
派生类的构造函数。
|
Modifier and Type | Method and Description |
---|---|
abstract Validator |
newValidator()
|
abstract ValidatorHandler |
newValidatorHandler()
为此
Schema 新
ValidatorHandler 。
|
public abstract Validator newValidator()
public abstract ValidatorHandler newValidatorHandler()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.