public interface DOMImplementationLS
| org.w3c.dom.ls.DOMImplementationLS |
DOMImplementationLS包含用于创建加载和保存对象的工厂方法。
期望的是,的一个实例 DOMImplementationLS接口可以通过使用在实例特异性结合铸造方法获得 DOMImplementation界面,或者,如果 Document支持该功能 "Core"版本 "3.0"在[定义 DOM Level 3 Core ,通过使用该方法] DOMImplementation.getFeature与参数值 "LS" (或 "LS-Async" )和 "3.0" (分别)。
另见 Document Object Model (DOM) Level 3 Load and Save Specification 。
常量(Constants) |
|
|---|---|
short |
MODE_ASYNCHRONOUS 创建一个异步 |
short |
MODE_SYNCHRONOUS 创建一个同步 |
公共方法(Public methods) |
|
|---|---|
abstract LSInput |
createLSInput() 创建一个新的空输入源对象,其中 |
abstract LSOutput |
createLSOutput() 创建一个新的空输出目标对象,其中 |
abstract LSParser |
createLSParser(short mode, String schemaType) 创建一个新的 |
abstract LSSerializer |
createLSSerializer() 创建一个新的 |
LSInput createLSInput ()
创建一个新的空输入源对象,其中 LSInput.characterStream , LSInput.byteStream , LSInput.stringData LSInput.systemId , LSInput.publicId , LSInput.baseURI ,并 LSInput.encoding为空,且 LSInput.certifiedText是假的。
| 返回(Returns) | |
|---|---|
LSInput |
The newly created input object. |
LSOutput createLSOutput ()
创建一个新的空输出目标对象,其中 LSOutput.characterStream , LSOutput.byteStream , LSOutput.systemId , LSOutput.encoding为空。
| 返回(Returns) | |
|---|---|
LSOutput |
The newly created output object. |
LSParser createLSParser (short mode, String schemaType)
创建一个新的LSParser 。 新构建的解析器可以通过它的DOMConfiguration对象进行配置,并用于通过其parse方法解析文档。
| 参数(Parameters) | |
|---|---|
mode |
short: The mode argument is either MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS, if mode is MODE_SYNCHRONOUS then the LSParser that is created will operate in synchronous mode, if it's MODE_ASYNCHRONOUS then the LSParser that is created will operate in asynchronous mode. |
schemaType |
String: An absolute URI representing the type of the schema language used during the load of a Document using the newly created LSParser. Note that no lexical checking is done on the absolute URI. In order to create a LSParser for any kind of schema types (i.e. the LSParser will be free to use any schema found), use the value null. 注意:对于W3C XML Schema [ XML Schema Part 1 ],应用程序必须使用值 |
| 返回(Returns) | |
|---|---|
LSParser |
The newly created LSParser object. This LSParser is either synchronous or asynchronous depending on the value of the mode argument. 注意:默认情况下,新创建的 |
| 抛出异常(Throws) | |
|---|---|
DOMException |
NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is not supported. |
LSSerializer createLSSerializer ()
创建一个新的 LSSerializer对象。
| 返回(Returns) | |
|---|---|
LSSerializer |
The newly created LSSerializer object. 注意:默认情况下,新创建的 |