Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2003, 10:44 PM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Late Binding

I'm about to distribute my program that uses the Microsoft XML, v3.0 library.

I really need to use late binding instead.

To use late binding in AutoCad I used:
Code:
AcadObj = CreateObject("AutoCAD.Application")
method to set the application object. Does anyone know how I can set the XML application object or any other method to use late binding with XML?

If you don't succeed you run the risk of failure. * Dan Quayle
 
Old July 11th, 2003, 03:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

You don't say, but I assume you're using VB here and not script?

Its the Dim statement that determines whether an object is early or late bound, not the statement that creates the instance of the object. Just declare it as object and it will be late bound, like this:
Dim x As Object
Set x = CreateObject("MSXML2.DOMDocument.3.0")
 
Old July 17th, 2003, 05:35 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for responding.

Yes I'm using VB here.

Incase the user doesn't have v3.0 I want to be able to bind to the earliest library possible that's compatiable with v3.0.

Would that be v2.6? In that case I substitue 2.6 in place of 3.0 in the createobject method, is that correct?

Any thoughts or advice on building a robust distributed program using XML is welcomed.

If you don't succeed you run the risk of failure. * Dan Quayle
 
Old July 17th, 2003, 06:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

With MSXML 3 or earlier, you could use version independent progid (they were removed in v4). So you would just need Set x = CreateObject("MSXML2.DOMDocument") and that would pick up whatever version was on the client machine (2, 2.6 or 3).

There was another even earlier progid "Microsoft.XMLDOM" so you might want to test for this too. It all depends what your program uses MSXML for...I guess you need to look at this and decide which is the lowest version of MSXML that will cope with your code.

You also might want to take a look around the web for MSXML version checkers (I think there's one at perfectxml.com) and see what they do...

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
Late Binding with COM DLL Rajashekhar G H Access 1 November 4th, 2011 01:33 PM
late binding meghaljani BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 6 August 22nd, 2008 07:06 PM
late binding,help? alexcym Visual Basic 2005 Basics 2 April 7th, 2008 03:26 PM
Subform Late Binding probitaille Access VBA 0 August 18th, 2007 02:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.