MSXML DOM help
-
I'm trying to use MSXML 4 DOM to parse a xml document in Visual C++, but without success. A snippet of the xml structure is a following:
-
I'm trying to use MSXML 4 DOM to parse a xml document in Visual C++, but without success. A snippet of the xml structure is a following:
johnnyXP wrote: I'm trying to ..., but without success. What is the problem ? You don't know what to start from ? Or you can not look at
MSDN
, whereMSXML
interfaces are well documented ? Or you have some kind of errors ? If you have you own code, which is not working, you can post a fragment. Andrew -
johnnyXP wrote: I'm trying to ..., but without success. What is the problem ? You don't know what to start from ? Or you can not look at
MSDN
, whereMSXML
interfaces are well documented ? Or you have some kind of errors ? If you have you own code, which is not working, you can post a fragment. Andrew -
I have the MSXML SDK documentation. Actually i can't understand how to iterate throw all "album" nodes and also how to iterate within an album node to get all tracks... I have do the same job in C# with .NET framework, but i can't in MSXML ...
documentElement
property ofIXMLDOMDocument
will return you code tag. Then you need to usefirstChild
property ofIXMLDOMNode
to get data node. And again the same to get first album node. Having album node you can use it'snextSibling
property to get next album node. So, I hope it's clear how to get all albums and tracks. By the way, you can useselectSingleNode("/code/data/album")
from you document node. HavingIXMLDOMNode
you can queryIXMLDOMElement
interface and itsgetAttribute
method. With best regards, Andrew -
documentElement
property ofIXMLDOMDocument
will return you code tag. Then you need to usefirstChild
property ofIXMLDOMNode
to get data node. And again the same to get first album node. Having album node you can use it'snextSibling
property to get next album node. So, I hope it's clear how to get all albums and tracks. By the way, you can useselectSingleNode("/code/data/album")
from you document node. HavingIXMLDOMNode
you can queryIXMLDOMElement
interface and itsgetAttribute
method. With best regards, Andrew