I happen to be using the following fragment of code to instantiate a MSXML DOM object and process an xml file.
CREATE OBJECT DOM OF CLASS ‘MSXML2.DOMDocument.4.0’
DOM.ASYNC := false
SEND METHOD ‘load’ TO DOM WITH ‘D:\EXAMPLES\WEATHER.XML’
DOC := DOM.documentElement
SEND METHOD ‘getElementsByTagName’ TO DOC WITH ‘datetime’ RETURN TEMP
SEND METHOD ‘item’ TO TEMP WITH 0 RETURN TEMP
Does anyone know where is the key string “MSXML2.DOMDocument.4.0’” defined? And in general, where in my workstation (windows) can I search for the available objects usable in Natural program? The fact is I can see no trace of this object (as an example) via the natural component browser, yet I can use it!
I am asking from the perspectives of a Natural programmer. Thanks in advance.
There a two entry points for your external classes:
First the dialog editor, where you can insert Active-X controls.
Second is the component browser.
What you are looking for are interfaces - e.g. for the msxml.dll providing you the DOM interface to xml. For msxml.dll the interfaces are all named IXML…
For this you can find more information at:
For your area especially you can follow the following links (page by page):
MSXML SDK
DOM
Reference
XML DOM Objects/Interfaces
IXMLDOMDocument/DOMDocument
where you can find examples for different languages which should it make easy to adopt to Natural.
If you have found a specific object or interface, then you can have a look at the component browser which will help you to code the correct call from Natural.
The Objects/Classes you are searching for can be found at the ‘Component Browser’ at ‘All Active-X Components’ if you look e.g. for:
XML DOM Document
XML HTTP
Now you can see different versions of this component, you can choose.
May there is an interface specified you can find at the ‘Interface’ section of the ‘Component Browser’, other methods and attributes you may see directly.
=> see the ‘Component Browser’ documentation for more details.
You are looking for the ProgID of the component, while the Component Browser shows by default the descriptive names. Switch the option ‘View/Show by ProgID’ on, open ‘All ActiveX Components’ and the ProgIDs will be shown. Here you will also find the one you are looking for. Regards, +o:-]