Solved

Error creating DOM document

Posted on 2001-07-12
9
283 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
Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

 
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

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
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, …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

636 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