Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Error creating DOM document

Posted on 2001-07-12
9
Medium Priority
?
288 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
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 200 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Screencast - Getting to Know the Pipeline
Suggested Courses

972 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