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. How to read an XML file in C++.?

How to read an XML file in C++.?

Scheduled Pinned Locked Moved C / C++ / MFC
c++xmlhelptutorialquestion
8 Posts 8 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.
  • M Offline
    M Offline
    mbatra31
    wrote on last edited by
    #1

    Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

    enhzflepE L D U D 7 Replies Last reply
    0
    • M mbatra31

      Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

      enhzflepE Offline
      enhzflepE Offline
      enhzflep
      wrote on last edited by
      #2

      Oh I doubt it. I dont think anyone's ever used c++ to read xml files, let alone written a library for it. Google will surely vindicate me.. :-\

      "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon

      1 Reply Last reply
      0
      • M mbatra31

        Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        A few seconds with Google could have found you https://msdn.microsoft.com/en-us/library/ms752872(v=vs.85).aspx[^].

        1 Reply Last reply
        0
        • M mbatra31

          Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          See if this will get you started.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          1 Reply Last reply
          0
          • M mbatra31

            Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

            U Offline
            U Offline
            Ujesh Mohanan
            wrote on last edited by
            #5

            MSXML and tinyXML are two options for you.

            1 Reply Last reply
            0
            • M mbatra31

              Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

              D Offline
              D Offline
              DavidBaird
              wrote on last edited by
              #6

              I use Expat to read XML files. See http://www.libexpat.org/. I use to this to read Excel XLSX files once they are unzipped with the zlib library.

              1 Reply Last reply
              0
              • M mbatra31

                Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

                M Offline
                M Offline
                Maximilien
                wrote on last edited by
                #7

                We build our own library on top of MSXML (painful). Now, I'm trying to push http://pugixml.org/[^] for our XML need; I've used it for relatively small and not too complex XML files and it works great.

                I'd rather be phishing!

                1 Reply Last reply
                0
                • M mbatra31

                  Hi, I want to read an xml file in C++. Is there any sample code or any library available.? I want to read the contents of XML file. Its nodes and attribute's value. I need an XML parser written in C++. Any help will be appreciated. Regards, Mbatra

                  P Offline
                  P Offline
                  Peter Weyzen
                  wrote on last edited by
                  #8

                  Using MSXML to read XML documents[^] Great, intuitive lib to MSXML.

                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [soonr.com -- PC Power delivered to your phone](http://www.soonr.com)

                  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