Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MSXML DOM help

MSXML DOM help

Scheduled Pinned Locked Moved C / C++ / MFC
c++htmlxmlhelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    johnnyXP
    wrote on last edited by
    #1

    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: Can anyone give me a code snippet to parse album label, track label, sndUrl, txtUrl attributes to a CString? Please help! Thanks in advance for any answers.

    A 1 Reply Last reply
    0
    • J johnnyXP

      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: Can anyone give me a code snippet to parse album label, track label, sndUrl, txtUrl attributes to a CString? Please help! Thanks in advance for any answers.

      A Offline
      A Offline
      Andrew Kirillov
      wrote on last edited by
      #2

      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, where MSXML 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

      J 1 Reply Last reply
      0
      • A Andrew Kirillov

        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, where MSXML 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

        J Offline
        J Offline
        johnnyXP
        wrote on last edited by
        #3

        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 ...

        A 1 Reply Last reply
        0
        • J johnnyXP

          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 ...

          A Offline
          A Offline
          Andrew Kirillov
          wrote on last edited by
          #4

          documentElement property of IXMLDOMDocument will return you code tag. Then you need to use firstChild property of IXMLDOMNode to get data node. And again the same to get first album node. Having album node you can use it's nextSibling property to get next album node. So, I hope it's clear how to get all albums and tracks. By the way, you can use selectSingleNode("/code/data/album") from you document node. Having IXMLDOMNode you can query IXMLDOMElement interface and its getAttribute method. With best regards, Andrew

          J 1 Reply Last reply
          0
          • A Andrew Kirillov

            documentElement property of IXMLDOMDocument will return you code tag. Then you need to use firstChild property of IXMLDOMNode to get data node. And again the same to get first album node. Having album node you can use it's nextSibling property to get next album node. So, I hope it's clear how to get all albums and tracks. By the way, you can use selectSingleNode("/code/data/album") from you document node. Having IXMLDOMNode you can query IXMLDOMElement interface and its getAttribute method. With best regards, Andrew

            J Offline
            J Offline
            johnnyXP
            wrote on last edited by
            #5

            I' ve got it. Thanks.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups