I'm looking to parse some data from the iTunes Library XML file and for that I'd like to have an elegant solution in VBScript to parse the key/value pairs. This is the XML structure:
<plist version="1.0">
<dict>
<dict>
<key>1</key>
<dict>
<key>Location</key><string>"file1.mp3"</string>
</dict>
<key>2</key>
<dict>
<key>Location</key><string>"file2.mp3"</string>
</dict>
</dict>
</dict>
</plist>
I've now listed only two key/value (<key>/<dict>
) pairs but of course there are many.
I'd like to parse this into some kind of dictionary object like so:
1 file1.mp3
2 file2.mp3
I can think of some ways to achieve this, like involving the NextSibling()
method, but that really seems too far-fetched to me.
So what would be a more official/elegant solution to this problem? Thanks in advance!