We help IT Professionals succeed at work.

VBA Code to read from a simple XML file to create a collection of objects in Word VBA Project

207 Views
Last Modified: 2017-10-27
I have a very simple XML file. In a VBA Project for Word, I would like to read from this XML file named VerySimple and create a collection of Book Objects based on a Book class in my project.
I would appreciate help with VBA code that would help me achieve that.
The xmle file looks like this:
<?xml version="1.0"?>
<catalog>
   <book id="1">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
   </book>
   <book id="2">
      <author>Ralls, Kim</author>
      <title>Midnight Rain</title>
   </book>  
</catalog>

Open in new window

Comment
Watch Question

Senior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Wonderful!!
Worked perfectly. Many thanks.