Solved

Error creating DOM document

Posted on 2001-07-12
9
282 Views
Last Modified: 2008-02-01
Hi

  I am getting a 'type mismatch' error when I am trying to create a XML document. I have set a reference to Microsost XMl, v4.0.

Could someoen please help.

Dylan

Dim usersDoc As DOMDocument
Set usersDoc = CreateObject("Microsoft.XMLDOM")
0
Comment
Question by:dilantha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 2

Expert Comment

by:missionImpossible
ID: 6277140
Try

Dim usersDoc As DOMDocument
Set usersDoc = CreateObject("Microsoft.XMLDOMDocument")

or

Dim xmldoc
Set xmldoc = CreateObject("Msxml2.DOMDocument")


0
 
LVL 8

Accepted Solution

by:
Dave_Greene earned 50 total points
ID: 6277511
Looks like you are working from VB, why are you using late binding?

<<Set usersDoc = CreateObject("Microsoft.XMLDOM")>>

You could just use

Dim usersDoc As DOMDocument
Set usersDoc = New DOMDocument
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6277654
You posted this question in two forums.  You should post the question in only one then post the link in the other forum.
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6280427
hi dylan

your code should loo like this:

    Dim xmldoc As New DOMDocument
   
    xmldoc.async = False
    xmldoc.loadXML (strXMLResult) 'if you load XML-data as a String
    xmldoc.load (fileXML) 'if you load XML-file

that should work
MicOfLZ
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6280432
remark: use just one load method at a time :-)
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6353359
Greetings, dilantha.  You have asked 41 questions within Experts Exchange, but only closed 20 of them.  I will post follow up comments on all your open items to help you navigate to them and complete them.
__________________________________

It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order on some older questions.  REGARDING POINTS and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 
LVL 3

Expert Comment

by:modder
ID: 6489734
Hello all,

dilantha is a duplicate account, and it has been closed.

Please advise as to who should get points for this.

modder
Community Support
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6490787
My answer should have fixed it for them...
0
 

Author Comment

by:dilantha
ID: 6497665
Hi Dave

  Thanx alot. Sorry for the delay.

Dilantha
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question