The API
The DOM 3.0 LS API is implemented in the org.w3c.dom.ls
package. The DOMImplementationLS
interface contains factory methods for creating Load and Save objects, which are LSInput, LSOutput, LSParser
, and LSSerialize
. The LSParser
interface is used to parse input data and construct a DOM document structure. The input data may be in the form of a character stream, byte stream, string, public ID or system ID. The LSInput
interface represents an input data source. The LSParser
uses the LSInput
object to parse input data from various types of input sources. LSParser
scans input sources specified in the LSInput
object in the following order and uses the first input source that is not null and not an empty string:
1.
LSInput.characterStream
2.
LSInput.byteStream
3.
LSInput.stringData
4.
LSInput.systemId
5.
LSInput.publicId
The various input sources that may be specified are character stream, byte stream, string data, system identifier, and public identifier. The LSParserFilter
interface...