HTTPTools.getXML
Retrieve an XML document from the given URI using HTTP GET.
Example usage:
IO.setLoadXMLFunction(function (uri) {
// Fetch the document from a different URI:
return HTTPTools.getXML("/getDocumentById/?id=" + uri, true);
});
This function can be used to retrieve documents for abstract URI's such as urn:uuid:a0f6b479-b487-48f0-83a6-9ff40dae1ec4:
IO.setLoadXMLFunction(function (uri) {
var id = uri.replace(/^urn:uuid:(.+)$/, "$1");
return HTTPTools.getXML("/repository/" + id);
});
- Documentation
- › API
- › Global objects API
- › HTTPTools.getXML
HTTPTools.getXML( uri : String[, bypassCache : Boolean]) : XMLDocument
: String[, bypassCache : Boolean]) : XMLDocumentArguments
- uri
- String. The URI of the document.
- bypassCache
- Boolean. If
true, the document will not be loaded from the browser cache. (Optional)