` Printed Icetips Article

Icetips Article



Par2: Creating XML object with OLE
2000-02-16 -- Brett Cammack
 
>    I want to use the XML object (Microsoft.XMLDOM), so I use the OLE
>control to create the XML Object :
>
>        ?OLE{PROP:Create} = 'Microsoft.XMLDOM'
>        ?OLE{'async') = FALSE
>        root = ?OLE{'documentElement'} ! get the sub object
>        MESSAGE(root{'xml'})  ! Compilation error

Lucky you!  I just went through this last week!  

declare root as a CSTRING(31) in whatever scope is correct (global,
module, or local) for your implementation.

Now, presuming that the VB example they gave something like:  

SET ObjectName = CREATEOBJECT(Microsoft.XMLDOM)
ObjectName.Async = FALSE
SET Root = ObjectName.DocumentElement
SomeReceivingVariable = Root.Xml

make your references as shown in the  example below:

Root CSTRING(31)

CODE
?OLE{PROP:Create} = 'Microsoft.XMLDOM'
?OLE{'async') = FALSE
Root = ?OLE{'documentElement'} ! get the sub object
MESSAGE(?OLE{Root & '.Xml'})



Printed May 4, 2024, 10:45 pm
This article has been viewed/printed 35111 times.