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. writing an xml file.

writing an xml file.

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioxmltutorialworkspace
5 Posts 4 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.
  • S Offline
    S Offline
    swaapu
    wrote on last edited by
    #1

    HI I don`t know how to write in an xml file through mfc. The whole file has to be written. Also, the file has to be created from mfc code. I am working on VS 6 in windows XP environment. Thanx a lot

    S D T 3 Replies Last reply
    0
    • S swaapu

      HI I don`t know how to write in an xml file through mfc. The whole file has to be written. Also, the file has to be created from mfc code. I am working on VS 6 in windows XP environment. Thanx a lot

      S Offline
      S Offline
      sunit5
      wrote on last edited by
      #2

      http://www.codeproject.com/soap/markupclass.asp or u can use IXMLDOMocument http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/39b17b9c-04c7-4fa8-bcee-1f7d57eefd74.asp

      1 Reply Last reply
      0
      • S swaapu

        HI I don`t know how to write in an xml file through mfc. The whole file has to be written. Also, the file has to be created from mfc code. I am working on VS 6 in windows XP environment. Thanx a lot

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

        Can you use the DOMDocument or IXMLDOMDocument2 interface?


        "Take only what you need and leave the land as you found it." - Native American Proverb

        S 1 Reply Last reply
        0
        • D David Crow

          Can you use the DOMDocument or IXMLDOMDocument2 interface?


          "Take only what you need and leave the land as you found it." - Native American Proverb

          S Offline
          S Offline
          sunit5
          wrote on last edited by
          #4

          http://www.codeproject.com/soap/markupclass.asp in this article, after creating the xml,u can store the xml in a CString (CString csXML = xml.GetDoc();) if u r creating the File using MFC ie CFile char* ptoxml=csXML.GetBuffer(csXML.GetLength()+1); CFile::Write((LPVOID)ptoxml,csXML.GetLength()+1);

          1 Reply Last reply
          0
          • S swaapu

            HI I don`t know how to write in an xml file through mfc. The whole file has to be written. Also, the file has to be created from mfc code. I am working on VS 6 in windows XP environment. Thanx a lot

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            as Sunit5 has mentioned MarkUp class is good alternative for writing and reading XML file but.. By My Personel Preferenc would you learn XMLDOM object ( if time permits you) other wise MARKUP class is good alternative

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta VC Forum Q&A :- I/ IV

            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