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. Using XML in MFC

Using XML in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++xmlhelpquestion
11 Posts 6 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.
  • L Offline
    L Offline
    LCI
    wrote on last edited by
    #1

    All i would like to do is read an XML file and create one. I forgot how tricky this can be in C++ . I am using things like: MSXML2::IXMLDOMDocument2Ptr pDocument; MSXML2::IXMLDOMElementPtr pDocRoot; MSXML2::IXMLDOMElementPtr pFound_Element; MSXML2::IXMLDOMNodePtr pTag; In my stdafx.h I placed : #import using namespace MSXML2; I keep getting Cannot open type library file: 'msxml4.dll': No such file or directory. Has anyone done this before who can give some guidance/Help?

    L C D B 4 Replies Last reply
    0
    • L LCI

      All i would like to do is read an XML file and create one. I forgot how tricky this can be in C++ . I am using things like: MSXML2::IXMLDOMDocument2Ptr pDocument; MSXML2::IXMLDOMElementPtr pDocRoot; MSXML2::IXMLDOMElementPtr pFound_Element; MSXML2::IXMLDOMNodePtr pTag; In my stdafx.h I placed : #import using namespace MSXML2; I keep getting Cannot open type library file: 'msxml4.dll': No such file or directory. Has anyone done this before who can give some guidance/Help?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      It's been a while since I used it but I would guess you don't have MSXML4 installed correctly (with any Service Packs) on your system. The installation should place it correctly and register it etc. What version of Visual Studio and Windows are you running?

      L 2 Replies Last reply
      0
      • L led mike

        It's been a while since I used it but I would guess you don't have MSXML4 installed correctly (with any Service Packs) on your system. The installation should place it correctly and register it etc. What version of Visual Studio and Windows are you running?

        L Offline
        L Offline
        LCI
        wrote on last edited by
        #3

        I am running visual studio version 7 and XP SP 2

        1 Reply Last reply
        0
        • L led mike

          It's been a while since I used it but I would guess you don't have MSXML4 installed correctly (with any Service Packs) on your system. The installation should place it correctly and register it etc. What version of Visual Studio and Windows are you running?

          L Offline
          L Offline
          LCI
          wrote on last edited by
          #4

          Can you recommend a decent link for this download?

          L 1 Reply Last reply
          0
          • L LCI

            All i would like to do is read an XML file and create one. I forgot how tricky this can be in C++ . I am using things like: MSXML2::IXMLDOMDocument2Ptr pDocument; MSXML2::IXMLDOMElementPtr pDocRoot; MSXML2::IXMLDOMElementPtr pFound_Element; MSXML2::IXMLDOMNodePtr pTag; In my stdafx.h I placed : #import using namespace MSXML2; I keep getting Cannot open type library file: 'msxml4.dll': No such file or directory. Has anyone done this before who can give some guidance/Help?

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #5

            take a look at tinyXML. true, it doesn't do everything MSXML does (no DTD, XSL or XSLT support), but if you don't need that, you can save yourself the pain of dealing with COM, DLLs and #imports. plus, you get the source, so you're not stuck fighting the blackbox that is MSXML*.

            image processing toolkits | batch image processing

            1 Reply Last reply
            0
            • L LCI

              Can you recommend a decent link for this download?

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              umm Microsoft.com ?? :confused:

              1 Reply Last reply
              0
              • L LCI

                All i would like to do is read an XML file and create one. I forgot how tricky this can be in C++ . I am using things like: MSXML2::IXMLDOMDocument2Ptr pDocument; MSXML2::IXMLDOMElementPtr pDocRoot; MSXML2::IXMLDOMElementPtr pFound_Element; MSXML2::IXMLDOMNodePtr pTag; In my stdafx.h I placed : #import using namespace MSXML2; I keep getting Cannot open type library file: 'msxml4.dll': No such file or directory. Has anyone done this before who can give some guidance/Help?

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

                LCI wrote:

                I keep getting Cannot open type library file: 'msxml4.dll': No such file or directory.

                Does the file exist on the development machine? Are the search paths set correctly?


                "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                1 Reply Last reply
                0
                • L LCI

                  All i would like to do is read an XML file and create one. I forgot how tricky this can be in C++ . I am using things like: MSXML2::IXMLDOMDocument2Ptr pDocument; MSXML2::IXMLDOMElementPtr pDocRoot; MSXML2::IXMLDOMElementPtr pFound_Element; MSXML2::IXMLDOMNodePtr pTag; In my stdafx.h I placed : #import using namespace MSXML2; I keep getting Cannot open type library file: 'msxml4.dll': No such file or directory. Has anyone done this before who can give some guidance/Help?

                  B Offline
                  B Offline
                  bob16972
                  wrote on last edited by
                  #8

                  If you just want to get it working for now, use this #import <msxml3.dll> However, be forewarned if your using VC++ 2003 and trying the "using namespace MSXML2;" line in your stdafx.h file. See this post for a "solution" to the ambiguous symbols errors that might creep up... VC++ 2003 "ambiguous symbol errors"[^]

                  K 1 Reply Last reply
                  0
                  • B bob16972

                    If you just want to get it working for now, use this #import <msxml3.dll> However, be forewarned if your using VC++ 2003 and trying the "using namespace MSXML2;" line in your stdafx.h file. See this post for a "solution" to the ambiguous symbols errors that might creep up... VC++ 2003 "ambiguous symbol errors"[^]

                    K Offline
                    K Offline
                    kanduripavan
                    wrote on last edited by
                    #9

                    hi, I think u have to either download a patch which is available in ms patch downloads. I think the build of yours is a debug one, try in the release mode. becoz i faced similar problem when i downloaded the xml sdk. I am not sure , try this. If it works or not take it as a note. See u.

                    B 1 Reply Last reply
                    0
                    • K kanduripavan

                      hi, I think u have to either download a patch which is available in ms patch downloads. I think the build of yours is a debug one, try in the release mode. becoz i faced similar problem when i downloaded the xml sdk. I am not sure , try this. If it works or not take it as a note. See u.

                      B Offline
                      B Offline
                      bob16972
                      wrote on last edited by
                      #10

                      kanduripavan wrote:

                      I think the build of yours is a debug one

                      That's usually what I build with until release day. I'm not having any problems with my XML apps so I'm not sure what your response refers to. Did you mean to post to the OP?

                      K 1 Reply Last reply
                      0
                      • B bob16972

                        kanduripavan wrote:

                        I think the build of yours is a debug one

                        That's usually what I build with until release day. I'm not having any problems with my XML apps so I'm not sure what your response refers to. Did you mean to post to the OP?

                        K Offline
                        K Offline
                        kanduripavan
                        wrote on last edited by
                        #11

                        I had downloaded one version of msxml sdk,which ran perfectly alright in the release mode but not in the debug version. Faced similar difficulties like i was not able use the tlb (import lib). I then browsed and found that there was a patch for that release, so have to download that again and after then only i was able to build my application in debug mode. thats it.

                        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