-
public interface DOMImplementationLS
DOMImplementationLS
contains the factory methods for creating Load and Save objects.The expectation is that an instance of the
DOMImplementationLS
interface can be obtained by using binding-specific casting methods on an instance of theDOMImplementation
interface or, if theDocument
supports the feature"Core"
version"3.0"
defined in [DOM Level 3 Core] , by using the methodDOMImplementation.getFeature
with parameter values"LS"
(or"LS-Async"
) and"3.0"
(respectively).See also the Document Object Model (DOM) Level 3 Load and Save Specification.
-
-
Field Summary
Fields Modifier and Type Field and Description static short
MODE_ASYNCHRONOUS
Create an asynchronousLSParser
.static short
MODE_SYNCHRONOUS
Create a synchronousLSParser
.
-
Method Summary
Methods Modifier and Type Method and Description LSInput
createLSInput()
Create a new empty input source object whereLSInput.characterStream
,LSInput.byteStream
,LSInput.stringData
LSInput.systemId
,LSInput.publicId
,LSInput.baseURI
, andLSInput.encoding
are null, andLSInput.certifiedText
is false.LSOutput
createLSOutput()
Create a new empty output destination object whereLSOutput.characterStream
,LSOutput.byteStream
,LSOutput.systemId
,LSOutput.encoding
are null.LSParser
createLSParser(short mode, String schemaType)
Create a newLSParser
.LSSerializer
createLSSerializer()
Create a newLSSerializer
object.
-
-
-
Field Detail
-
MODE_SYNCHRONOUS
static final short MODE_SYNCHRONOUS
Create a synchronousLSParser
.- See Also:
- Constant Field Values
-
MODE_ASYNCHRONOUS
static final short MODE_ASYNCHRONOUS
Create an asynchronousLSParser
.- See Also:
- Constant Field Values
-
-
Method Detail
-
createLSParser
LSParser createLSParser(short mode, String schemaType) throws DOMException
Create a newLSParser
. The newly constructed parser may then be configured by means of itsDOMConfiguration
object, and used to parse documents by means of itsparse
method.- Parameters:
mode
- Themode
argument is eitherMODE_SYNCHRONOUS
orMODE_ASYNCHRONOUS
, ifmode
isMODE_SYNCHRONOUS
then theLSParser
that is created will operate in synchronous mode, if it'sMODE_ASYNCHRONOUS
then theLSParser
that is created will operate in asynchronous mode.schemaType
- An absolute URI representing the type of the schema language used during the load of aDocument
using the newly createdLSParser
. Note that no lexical checking is done on the absolute URI. In order to create aLSParser
for any kind of schema types (i.e. the LSParser will be free to use any schema found), use the valuenull
.Note: For W3C XML Schema [XML Schema Part 1] , applications must use the value
"http://www.w3.org/2001/XMLSchema"
. For XML DTD [XML 1.0], applications must use the value"http://www.w3.org/TR/REC-xml"
. Other Schema languages are outside the scope of the W3C and therefore should recommend an absolute URI in order to use this method.- Returns:
- The newly created
LSParser
object. ThisLSParser
is either synchronous or asynchronous depending on the value of themode
argument.Note: By default, the newly created
LSParser
does not contain aDOMErrorHandler
, i.e. the value of the " error-handler" configuration parameter isnull
. However, implementations may provide a default error handler at creation time. In that case, the initial value of the"error-handler"
configuration parameter on the newLSParser
object contains a reference to the default error handler. - Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is not supported.
-
createLSSerializer
LSSerializer createLSSerializer()
Create a newLSSerializer
object.- Returns:
- The newly created
LSSerializer
object.Note: By default, the newly created
LSSerializer
has noDOMErrorHandler
, i.e. the value of the"error-handler"
configuration parameter isnull
. However, implementations may provide a default error handler at creation time. In that case, the initial value of the"error-handler"
configuration parameter on the newLSSerializer
object contains a reference to the default error handler.
-
createLSInput
LSInput createLSInput()
Create a new empty input source object whereLSInput.characterStream
,LSInput.byteStream
,LSInput.stringData
LSInput.systemId
,LSInput.publicId
,LSInput.baseURI
, andLSInput.encoding
are null, andLSInput.certifiedText
is false.- Returns:
- The newly created input object.
-
createLSOutput
LSOutput createLSOutput()
Create a new empty output destination object whereLSOutput.characterStream
,LSOutput.byteStream
,LSOutput.systemId
,LSOutput.encoding
are null.- Returns:
- The newly created output object.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
18/12/2024 19:47:34 Cette version de la page est en cache (à la date du 18/12/2024 19:47:34) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 01/09/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-org/w3c/dom/ls/DOMImplementationLS.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.