Documentation Center

HTTPTools.getXML

Description

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);
});

Syntax

HTTPTools.getXML (uri : String[, bypassCache : Boolean]) : XMLDocument

Arguments

uri
String. The URI of the document.
bypassCache
Boolean. If true, the document will not be loaded from the browser cache. (Optional)

Return Value

XMLDocument. The DOM document.