Solved

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

Posted on 2009-04-14
2
1,160 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 100 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

729 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