public final class XMLConstants extends Object
实用类包含基本的XML值作为常量。
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_EXTERNAL_DTD
属性:accessexternaldtd
|
static String |
ACCESS_EXTERNAL_SCHEMA
属性:accessexternalschema
|
static String |
ACCESS_EXTERNAL_STYLESHEET
属性:accessexternalstylesheet
|
static String |
DEFAULT_NS_PREFIX
用于表示默认的xml命名空间的前缀。
|
static String |
FEATURE_SECURE_PROCESSING
安全处理功能。
|
static String |
NULL_NS_URI
命名空间URI使用代表没有命名空间。
|
static String |
RELAXNG_NS_URI
RELAX NG命名空间URI。
|
static String |
W3C_XML_SCHEMA_INSTANCE_NS_URI
W3C XML Schema实例命名空间URI。
|
static String |
W3C_XML_SCHEMA_NS_URI
W3C XML Schema命名空间URI。
|
static String |
W3C_XPATH_DATATYPE_NS_URI
W3C XPath数据类型的命名空间URI。
|
static String |
XML_DTD_NS_URI
XML文档类型声明的命名空间URI为任意值。
|
static String |
XML_NS_PREFIX
官方的XML命名空间前缀。
|
static String |
XML_NS_URI
XML命名空间URI的官方名称。
|
static String |
XMLNS_ATTRIBUTE
用于指定XML命名空间声明的官方XML属性。
|
static String |
XMLNS_ATTRIBUTE_NS_URI
官方的XML属性用于指定XML命名空间声明,
XMLConstants.XMLNS_ATTRIBUTE ,命名空间URI。
|
public static final String NULL_NS_URI
命名空间URI使用代表没有命名空间。
由命名空间规范定义为“”。
public static final String DEFAULT_NS_PREFIX
用于表示默认的xml命名空间的前缀。
被XML规范定义为“”。
public static final String XML_NS_URI
XML命名空间URI的官方名称。
定义的XML规范是“http://www.w3.org/XML/1998/namespace
”。
public static final String XML_NS_PREFIX
官方的XML命名空间前缀。
定义的XML规范是“xml
”。
public static final String XMLNS_ATTRIBUTE_NS_URI
官方的XML属性用于指定XML命名空间声明,XMLConstants.XMLNS_ATTRIBUTE
,命名空间URI。
定义的XML规范是“http://www.w3.org/2000/xmlns/
”。
public static final String XMLNS_ATTRIBUTE
用于指定XML命名空间声明的官方XML属性。
这是不有效使用作为前缀。定义的XML规范是“xmlns
”。
public static final String W3C_XML_SCHEMA_NS_URI
W3C XML Schema命名空间URI。
定义为“http://www.w3.org/2001/XMLSchema
”。
public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI
W3C XML Schema实例命名空间URI。
定义为“http://www.w3.org/2001/XMLSchema-instance
”。
public static final String W3C_XPATH_DATATYPE_NS_URI
W3C XPath数据类型的命名空间URI。
定义为“http://www.w3.org/2003/11/xpath-datatypes
”。
public static final String XML_DTD_NS_URI
XML文档类型声明的命名空间URI为任意值。
由于没有正式定义的任何现有的标准,任意定义为“http://www.w3.org/TR/REC-xml
”。
public static final String RELAXNG_NS_URI
RELAX NG命名空间URI。
定义为“http://relaxng.org/ns/structure/1.0
”。
public static final String FEATURE_SECURE_PROCESSING
安全处理功能。
true
指导实施处理XML安全。这可能会设置XML结构的限制,以避免条件,如拒绝服务攻击。false
指导实施与XML规范忽视安全问题,如限制XML结构避免拒绝服务攻击等条件按照处理XML。public static final String ACCESS_EXTERNAL_DTD
属性:accessexternaldtd
限制访问外部dtd和外部实体引用指定的协议。如果访问被拒绝由于此属性的限制,将引发特定于上下文的运行时异常。在SAXParser
的情况为例,SAXException
抛出。
价值:列表,以逗号分隔的协议。一个协议是一个URI
方案部分,或在罐子的协议的情况下,“罐子”加上方案部分分离的结。一个计划被定义为:
scheme = alpha *( alpha | digit | "+" | "-" | "." )
where alpha = a-z and A-Z.
And the JAR protocol:
jar[:scheme]
Protocols including the keyword "jar" are case-insensitive. Any whitespaces as defined byCharacter.isSpaceChar(char)
in the value will be ignored. Examples of protocols are file, http, jar:file.
默认值:默认值是特定的,因此没有规定执行。下列选项提供供考虑:
- an empty string to deny all access to external references;
- a specific protocol, such as file, to give permission to only the protocol;
- the keyword "all" to grant permission to all protocols.
When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations restrict external connections by default, though this may cause problems for applications that process XML/XSD/XSL with external references.
授予所有访问:关键词“所有”准许所有协议。
系统性能:此属性的值可以设置或系统属性javax.xml.accessExternalDTD
重写。
java_home $ { } / lib / jaxp.properties:这个配置文件是标准的Properties
格式。如果该文件存在,并且指定了系统属性,它的值将被用来覆盖属性的默认值。
public static final String ACCESS_EXTERNAL_SCHEMA
属性:accessexternalschema
限制访问外部参考集的schemaLocation属性中指定的协议,进口包括元。如果访问被拒绝由于此属性的限制,将引发特定于上下文的运行时异常。在SchemaFactory
的情况为例,org.xml.sax.saxexception抛出。
价值:列表,以逗号分隔的协议。一个协议是一个URI
方案部分,或在罐子的协议的情况下,“罐子”加上方案部分分离的结。一个计划被定义为:
scheme = alpha *( alpha | digit | "+" | "-" | "." )
where alpha = a-z and A-Z.
And the JAR protocol:
jar[:scheme]
Protocols including the keyword "jar" are case-insensitive. Any whitespaces as defined byCharacter.isSpaceChar(char)
in the value will be ignored. Examples of protocols are file, http, jar:file.
默认值:默认值是特定的,因此没有规定执行。下列选项提供供考虑:
- an empty string to deny all access to external references;
- a specific protocol, such as file, to give permission to only the protocol;
- the keyword "all" to grant permission to all protocols.
When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations restrict external connections by default, though this may cause problems for applications that process XML/XSD/XSL with external references.
授予所有访问:关键词“所有”准许所有协议。
系统性能:此属性的值可以设置或系统属性javax.xml.accessExternalSchema
重写
java_home $ { } / lib / jaxp.properties:这个配置文件是java.util.properties格式标准。如果该文件存在,并且指定了系统属性,它的值将被用来覆盖属性的默认值。
public static final String ACCESS_EXTERNAL_STYLESHEET
属性:accessexternalstylesheet
限制访问外部引用的样式表处理指令中指定的协议,进口包括元素和文档的功能。如果访问被拒绝由于此属性的限制,将引发特定于上下文的运行时异常。在构建新的Transformer
案为例,TransformerConfigurationException
将由TransformerFactory
扔。
价值:列表,以逗号分隔的协议。一个协议是一个URI
方案部分,或在罐子的协议的情况下,“罐子”加上方案部分分离的结。一个计划被定义为:
scheme = alpha *( alpha | digit | "+" | "-" | "." )
where alpha = a-z and A-Z.
And the JAR protocol:
jar[:scheme]
Protocols including the keyword "jar" are case-insensitive. Any whitespaces as defined byCharacter.isSpaceChar(char)
in the value will be ignored. Examples of protocols are file, http, jar:file.
默认值:默认值是特定的,因此没有规定执行。下列选项提供供考虑:
- an empty string to deny all access to external references;
- a specific protocol, such as file, to give permission to only the protocol;
- the keyword "all" to grant permission to all protocols.
When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations restrict external connections by default, though this may cause problems for applications that process XML/XSD/XSL with external references.
授予所有访问:关键词“所有”准许所有协议。
系统性能:此属性的值可以设置或系统属性javax.xml.accessExternalStylesheet
重写
java_home $ { } / lib / jaxp.properties:这个配置文件是java.util.properties格式标准。如果该文件存在,并且指定了系统属性,它的值将被用来覆盖属性的默认值。
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.