XML in an MSXML2.DOMDocument : Copy to Worksheet

bobtaylor

New Member
Joined
Jan 31, 2013
Messages
6
Hi,

I'm consuming a rest service from a SAAS platform and I need to find a way to read the XML returned back to the worksheet.

I've gotton as far as loading the XML into an MSXML2.DOMDocument.

The XML is indicated below :

<?xml version="1.0" encoding="UTF-8"?>
<response success="true">
<output>
<levels>
<level id="1" name="Blah" currency="USD" >
<level id="61" name="Blah" currency="USD" >
<level id="642" name="Blah" currency="USD" >
<level id="141" name="Blah" currency="USD" >
<level id="153" name="Blah" currency="USD" />
<level id="154" name="Blah" currency="USD" />
<level id="185" name="blah" currency="USD" />
<level id="186" name="Blah" currency="USD" />
</level>
<level id="142" name="Blah" currency="USD" >
<level id="155" name="Blah" currency="USD" />
<level id="159" name="Blah" currency="USD" />
<level id="163" name="Blah" currency="USD" />
<level id="188" name="Blah" currency="USD" />
</level>

<response success="true"><output><levels><level id="1" currency="USD" name="Blah"><level id="61" currency="USD" name="Blah"><level id="642" currency="USD" name="Blah"><level id="141" currency="USD" name="Blah"><level id="153" currency="USD" name="Blah"><level id="154" currency="USD" name="Blah"><level id="185" currency="USD" name="blah"><level id="142" currency="USD" name="Blah"><level id="155" currency="USD" name="Blah"><level id="159" currency="USD" name="Blah"><level id="163" currency="USD" name="Blah"><response success="true"><output><levels><level id="1" currency="USD" name="blahblah"><level id="61" name="blahblah currency=" USD?=""><level id="642" currency="USD" name="blahblah"><level id="141" currency="USD" name="blahblah"><level id="153" currency="USD" name="blahblah"><level id="154" currency="USD" name="blahblah"><level id="185" currency="USD" name="blahblah"><level id="142" currency="USD" name="blahblah"><level id="155" currency="USD" name="blah"><level id="159" currency="USD" name="blah"><level id="163" currency="USD" name="blah"><response success="true"><output><levels><level id="1" currency="USD" name="Blah"><level id="61" currency="USD" name="Blah"><level id="642" currency="USD" name="Blah"><level id="141" currency="USD" name="Blah"><level id="153" currency="USD" name="Blah"><level id="154" currency="USD" name="Blah"><level id="185" currency="USD" name="blah"><level id="142" currency="USD" name="Blah"><level id="155" currency="USD" name="Blah"><level id="159" currency="USD" name="Blah"><level id="163" currency="USD" name="Blah">I think I may need to use SelectSingleNode to traverse through the XML but I'm unsure of the required Xpath query.

I'd appreciate any help.</level></level></level></level></level></level></level></level></level></level></level></levels></output></response></level></level></level></level></level></level></level></level></level></level></level></levels></output></response></level></level></level></level></level></level></level></level></level></level></level></levels></output></response>
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
rEDMs7ew
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,576
Members
449,174
Latest member
chandan4057

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top