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,114 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
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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 how to use a scrolling table in Microsoft Excel using the INDEX function.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now