?
Solved

loadXML in Msxml2.DOMDocument.3.0 doesn't generate a XML-file from the provided XML-string.

Posted on 2009-04-14
2
Medium Priority
?
1,164 Views
Last Modified: 2012-05-06
Hi experts,

I have recently converted my way of loading libraries/references from the usual VBA way (Tools->References) to more of a late binding way (CreateObject("Referencename")) and I have problems with loadXML in my Msxml2.DOMDocument.3.0. I use MS Excel to generate an XML string and then I try to load it and save it to a folder, but the XML I save always turn out blank, whilst the text I have generated always looks quite ok (attached).

So I wonder what I am doing wrong, and what I have to do to make the generated XML save properly.

Any help appreciated,
eX.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="ex_avviksmelding.xsl"?>
<utskrift>
...
</utskrift>

Open in new window

0
Comment
Question by:Gaute Rønningen
[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
2 Comments
 
LVL 18

Assisted Solution

by:mdougan
mdougan earned 400 total points
ID: 24142931
Humm... try replacing all of the double-quotes with single quotes before loading into the DOM...
0
 

Accepted Solution

by:
Gaute Rønningen earned 0 total points
ID: 24145621
Think I solved it.

I added a:
SourceXML.validate

Which finally gave me an error to work with.
It seemed to be missing the XML version number in the automation, how it worked earlier I don't know.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

752 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