Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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,169 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

610 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