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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Automating an Excel Template using VBA and Outlook 8 25
Set WorkSheet  not Working 9 38
Clear a Text Box 7 23
COPYING ROW W/ CHECKBOX TO SEPARATE SHEET 3 19
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, …
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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