|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The DocumentLS interface provides a mechanism by which the content of a document can be replaced with the DOM tree produced when loading a URI, or parsing a string. The expectation is that an instance of the DocumentLS interface can be obtained by using binding-specific casting methods on an instance of the Document interface.
uses the default features.
See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.
Method Summary | |
void |
abort()
If the document is currently being loaded as a result of the method load being invoked the loading and parsing is
immediately aborted. |
boolean |
getAsync()
Indicates whether the method load should be synchronous or asynchronous. |
boolean |
load(java.lang.String uri)
Replaces the content of the document with the result of parsing the given URI. |
boolean |
loadXML(java.lang.String source)
Replace the content of the document with the result of parsing the input string, this method is always synchronous. |
java.lang.String |
saveXML(org.w3c.dom.Node snode)
Save the document or the given node to a string (i.e. |
void |
setAsync(boolean async)
Indicates whether the method load should be synchronous or asynchronous. |
Method Detail |
public boolean getAsync()
true
the load method returns control to the caller before the document has
completed loading. The default value of this property is
false
.
false
but we
need to check with Mozilla and IE.public void setAsync(boolean async)
true
the load method returns control to the caller before the document has
completed loading. The default value of this property is
false
.
false
but we
need to check with Mozilla and IE.public void abort()
load
being invoked the loading and parsing is
immediately aborted. The possibly partial result of parsing the
document is discarded and the document is cleared.public boolean load(java.lang.String uri)
ParseErrorEvent
).uri
- The URI reference for the XML file to be loaded. If this is
a relative URI...true
load
returns
true
if the document load was successfully initiated.
If an error occurred when initiating the document load
load
returns false
.If async is set to
false
load
returns true
if
the document was successfully loaded and parsed. If an error
occurred when either loading or parsing the URI load
returns false
.public boolean loadXML(java.lang.String source)
source
- A string containing an XML document.true
if parsing the input string succeeded
without errors, otherwise false
.public java.lang.String saveXML(org.w3c.dom.Node snode) throws org.w3c.dom.DOMException
snode
- Specifies what to serialize, if this parameter is
null
the whole document is serialized, if it's
non-null the given node is serialized.null
.org.w3c.dom.DOMException
- WRONG_DOCUMENT_ERR: Raised if the node passed in as the node
parameter is from an other document.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |