Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I instantiate the IXMLDOMElement Interface
Message
De
29/06/2002 11:04:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
00673609
Message ID:
00673613
Vues:
11
I think you may use GETINTERFACE() function
e.g.
oElemProducto = GETINTERFACE(;
objectThatSupports_IXMLDOMElement_interface, 'msxml.IXMLDOMElement' )
>Hello, everybody.
>
>I'm posting this in this category because there isn't one for XML or the Parser.
>
>To translate some code from VB, a friend of mine needs to create an instance of the IXMLDOMElement interface on the MSXML2.
>
>In VB, this is done this way:
>
>Dim oDocument As DOMDocument
>Dim oElement As IXMLDOMElement
>
>
>In VFP, I can do:
>
>LOCAL oDocument as MSXML2.DOMDocument
>oDocument = createobject('msxml.domdocument')
>
>Local oElemProducto as MSXML2.IXMLDOMElement
>oElemProducto = CreateObject( 'msxml.IXMLDOMElement' )
>
>But the last line give me an error, saying that class definition "msxml.IXMLDOMElement" doesn't exist. This is true, as this is an Interface, not a class, as I can see it in the Object Browser.
>
>The VB code later does this:
>
>Set oElement = oDocument.documentElement
>
>With oElement
>  oHolder.cProduct = .getAttributeNode("Code").Text
>  oHolder.cDescrip = .getAttributeNode("Description").Text
>end with
>
>And that's what he can't access.
>
>Any ideas on how to solve this?
>
>TIA

HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform