Package | dom.loadsave |
Interface | public interface DocumentLS |
Implementors | Document |
Obsolete
See also
Property | Defined By | ||
---|---|---|---|
DOM 3 Load and Save Obsolete async : Boolean
Indicates whether the method load should be synchronous or asynchronous. | DocumentLS |
Method | Defined By | ||
---|---|---|---|
If the document is currently being loaded as a result of the method load being invoked the loading and parsing is immediately
aborted. | DocumentLS | ||
Replaces the content of the document with the result of parsing the given URI. | DocumentLS | ||
Replace the content of the document with the result of parsing the input string, this method is always synchronous. | DocumentLS | ||
Save the document or the given node to a string (i.e. | DocumentLS |
DOM 3 Load and Save Obsolete async | property |
async:Boolean
Obsolete
Indicates whether the method load should be synchronous or asynchronous. When the async attribute is set to true the load method returns control to the caller before the document has completed loading.
The default value is false
.
public function get async():Boolean
public function set async(value:Boolean):void
DOMException — NOT_SUPPORTED_ERR: Raised if the implementation doesn't support the mode the attribute is being set to.
|
See also
function loadXMLData(e) { alert(new XMLSerializer().serializeToString(e.target)); // Gives querydata.xml contents as string } var xmlDoc = document.implementation.createDocument("", "test", null); xmlDoc.async = false; xmlDoc.onload = loadXMLData; xmlDoc.load('querydata.xml');
DOM 3 Load and Save Obsolete abort | () | method |
public function abort():void
Obsolete
If the document is currently being loaded as a result of the method 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.
See also
DOM 3 Load and Save Obsolete load | () | method |
public function load(uri:DOMString):Boolean
Obsolete
Replaces the content of the document with the result of parsing the given URI. Invoking this method will either block the caller or return to the caller immediately depending on the value of the async attribute. Once the document is fully loaded the document will fire a "load" event that the caller can register as a listener for. If an error occurs the document will fire an "error" event so that the caller knows that the load failed (see ParseErrorEvent). If this method is called on a document that is currently loading, the current load is interrupted and the new URI load is initiated.
Note (Mozilla): As of at least Gecko 1.9, this no longer supports cross-site loading of documents (Use XMLHttpRequest instead).
Parameters
uri:DOMString — The URI reference for the XML file to be loaded. If this is a relative URI, the base URI used by the implementation is implementation dependent.
|
Boolean — If async is set to 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.
|
See also
var xmlDoc = document.implementation.createDocument("", "test", null); function documentLoaded (e) { alert(new XMLSerializer().serializeToString(e.target)); // Gives querydata.xml contents as string } xmlDoc.addEventListener("load", documentLoaded, false); xmlDoc.load('querydata.xml');
DOM 3 Load and Save Obsolete loadXML | () | method |
public function loadXML(source:DOMString):Boolean
Obsolete
Replace the content of the document with the result of parsing the input string, this method is always synchronous. This method always parses from a DOMString, which means the data is always UTF16. All other encoding information is ignored.
Parameters
source:DOMString — A string containing an XML document.
|
Boolean — true if parsing the input string succeeded without errors, otherwise false.
|
See also
DOM 3 Load and Save Obsolete saveXML | () | method |
public function saveXML(snode:Node):DOMString
Obsolete
Save the document or the given node to a string (i.e. serialize the document or node).
Parameters
snode:Node — Specifies what to serialize, if this parameter is null the whole document is serialized, if it's non-null the given node is serialized.
|
DOMString — The serialized document or null.
|
DOMException — WRONG_DOCUMENT_ERR: Raised if the node passed in as the node parameter is from an other document.
|
See also