3
The XML Document (document)
The document object is the container for an XML Document. An XML Document is saved as a DOM tree. This DOM tree can be traversed with the help of a doccursor, which must be a child of the document object.
Definition
{ export | reexport } { model } document { <Identifier> } { [ <atribute definition> ] [ <method definition> ] }
Events
None
Children
Parents
Menu
None
Methods
3.1 Attributes
3.2 Object-specific Attributes
It is possible to access the XML Cursor of the XML Document through the doccursor attribute. The attribute is indexed with the object index (similar to child).
The Idispatch COM interface pointer in XML Documents can be accessed through the idispatch attribute under Microsoft Windows.
In the Rule Language the attribute can only be assigned to the same attribute of a different IDM object. Please note, in the programming interface a COM object will remain valid only as long as it remains in use in the ISA Dialog Manager. For this reason it is important to increase the reference counter of an application (COM Method: IUnknown->AddRef) . When the object is no longer needed, the counter must be decreased again (COM Method: IUnknown->Release). In any case, it is not allowed to decrease the counter more than it is increased. If this happens, the COM object will be released. The ISA Dialog Manager cannot recognize this situation, which will lead to a system crash. The ISA Dialog Manager may also crash when the given pointer does not point to a COM interface.
This attribute is not passed down because it refers to a runtime characteristic.
The IXMLDOMDocument2 COM interface pointer in XML Documents can be accessed through the ixmldomdocument2 attribute under Microsoft Windows.
In the Rule Language the attribute can only be assigned to the same attribute of a different IDM object. Please note, in the programming interface a COM object will remain valid only as long as it remains in use in the ISA Dialog Manager. For this reason it is important to increase the reference counter of an application (COM method: IUnknown->AddRef). When the object is no longer needed, then the counter must be decreased again (COM Method: IUnknown->Release). In any case, it is not allowed to decrease the counter more than it is increased. If this happens, the COM object will be released. The ISA Dialog Manager cannot recognize this situation, which will lead to a system crash. The ISA Dialog Manager may also crash when the given pointer does not point to a COM interface.
This attribute is not passed down because it refers to a runtime characteristic.
The string representation of XML Documents can be accessed with this attribute. When a new value is set, the saved DOM tree is deleted and a new DOM tree is built from the newly set value. All existing XML Cursors become invalid. When an XML Cursor is invalid, the attribute .mapped has the value false.
3.3 Object-specific Methods
This loads an XML Document from the given file or URL. The saved DOM tree is deleted, and a new DOM tree is built. All existing XML Cursors become invalid. When an XML Cursor is invalid, the attribute .mapped has the value false.
Saves the XML Document to a file or URL.
Transforms the XML Document with the given scheme. When the target is an XML Document, the saved DOM tree is deleted and a new tree is built. All existing XML Cursors become invalid. When an XML Cursor is invalid, the attribute .mapped has the value false.
Alternatively, the target of the transformation can be a text or file. If the result of the transformation is no legal XML format, then it needs to be directly converted into a text or file, as the result cannot be assigned to an XML Document. This is true, for example, for conversions to HTML.
This checks if the XML Document conforms to the document type given in the XML Document. If it does not have a document type, an error will occur.