Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Datatype of MSXML2.DOMDocument40 in VB?

35 views
Skip to first unread message

Chris Nelder

unread,
Jan 22, 2003, 3:49:22 PM1/22/03
to
Hi,

I'm experienced with ASP, but relatively new to VB
component development. When I try these lines:
Dim objXMLResponse As MSXML2.DOMDocument40
Dim objHTTP As MSXML2.ServerXMLHTTP

The compiler gives an error "User-defined type not
defined."

I have checked my References, and both "Microsoft XML,
version 2.0" and "Microsoft XML, version 3.0" are checked
for inclusion.

Anybody know what the magic incantation is? (The docs
cleverly leave out any VB examples!)

Thanks,
Chris

Elan Zhou(MSFT)

unread,
Jan 22, 2003, 9:36:20 PM1/22/03
to
Hi,

From your code snippet, you are using the MSXML2.DOMDocument40 object. This
object is a MSXML 4.0 object, so you need to reference "Microsoft XML 4.0"
in the project, instead of other versions of MSXML. If you haven't already
installed MSXML 4.0, you can download and install it from the following
location:

http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?ur
l=/msdn-files/027/001/766/msdncompositedoc.xml

For more information about MSXML 4.0, you can check the following document:

http://msdn.microsoft.com/library/?url=/library/en-us/xmlsdk/htm/sdk_intro_6
g53.asp?frame=true

Regards,
Elan Zhou
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com

Chris Nelder

unread,
Jan 23, 2003, 5:40:19 PM1/23/03
to

Thanks! That did the trick. My problem was actually that I'm running the
VB compiler on one machine, but all the files I'm using are on another,
my development server. I thought that the VB compiler would see the
components installed on the dev server, not realizing it was only
looking at my local machine! Installing the 4.0 parser on this machine
solved the problem.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 new messages