Associates the specified XML document with the specified key.
This function can be used to avoid repeated loading of the same XML file
with loadXMLDocument()
function (especially when it has
been already loaded from the generator command line).
Parameter:
element
The element that points to the XML document. It may be the#DOCUMENT
element itself or any element that belongs the XML document.If this parameter is not specified, the generator context element is assumed by default, i.e. the same as the call:
contextElement.markXMLDocument(key)
key
The key to be associated with the XML document.
Returns:
1
, if the XML document has been just associated with the specified key;
0
, if the XML document is already associated with that key;
-1
, if the provided element do not point to an XML document (this may be in case it isnull
or the#DOCUMENTS
element).
See Also:
loadXMLDocument(), findXMLDocument(), getXMLDocument()