Loads an XML file dynamically by the specified URI, parses it and
adds the new XML document to the list of all open documents provided
by #DOCUMENTS
element.
The repeating requests to load the same XML file (i.e. the one located by the same URI) are resolved according to the following.
When the parameter key
is absent, on each subsequent request to
load the same XML file, the function does nothing and just returns some already loaded
XML document instance of that file.
When the parameter key
is specified, it must provide an additional hash-key that
will be associated with the loaded XML document instance returned by the function.
Now, only the entire pair {URI; key} must be unique.
If the specified XML file has never been read, a new XML document instance will be loaded from it,
associated with the key and returned by the function.
Otherwise, there may be two situations:
loadXMLDocument(xmlURI)
call).
Then, that instance will be used -- associated with the key and returned by the function.
setServiceAttr()
function).
Note: Any error that happens during the opening, reading and parsing of the XML file will be reported by the function.
Parameter:
xmlURI
The URI of the XML file to load. This may be a URL or an absolute pathname on the local system.Note: When the specified URI is an empty (or blank) string, the function returns
null
.
key
The additional key to control the repeated loading of the same XML file.
Returns:
The DSM element of #DOCUMENT
type that represents the new
(or already open) XML document.
See Also:
All Element Types |#DOCUMENT
,#DOCUMENTS
;
findXMLDocument(), getXMLDocument()