` 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 November 21, 2024, 7:03 am
This article has been viewed/printed 35205 times.