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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to convert word file in to xml using c/c++

how to convert word file in to xml using c/c++

Scheduled Pinned Locked Moved C / C++ / MFC
c++xmlhelptutorial
9 Posts 3 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.
  • K Offline
    K Offline
    krishnaprasad t
    wrote on last edited by
    #1

    hi..i have a requirement to write C/c++ application that converts Microsoft Word (.doc) Documents into XML format. The application should be able to receive/open a Word document and save a XMl file with the same name, but with the extension .xml..ur valuable suggestions will help me n will be appreciated..thanks

    L D 2 Replies Last reply
    0
    • K krishnaprasad t

      hi..i have a requirement to write C/c++ application that converts Microsoft Word (.doc) Documents into XML format. The application should be able to receive/open a Word document and save a XMl file with the same name, but with the extension .xml..ur valuable suggestions will help me n will be appreciated..thanks

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

      This is not a simple matter in C++; see https://www.google.com/search?q=word+document+c%2B%2B[^].

      K 1 Reply Last reply
      0
      • L Lost User

        This is not a simple matter in C++; see https://www.google.com/search?q=word+document+c%2B%2B[^].

        K Offline
        K Offline
        krishnaprasad t
        wrote on last edited by
        #3

        is there any library file to include in the code?..how to convert the entire docx formate?

        L 1 Reply Last reply
        0
        • K krishnaprasad t

          is there any library file to include in the code?..how to convert the entire docx formate?

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

          You need to follow some of those links and do some research. As I said, reading Word documents in C/C++ is not particularly easy, unless you are familiar with C++/CLI, in which case you can use the Microsoft.Office.Interop.Word Namespace[^]

          K 2 Replies Last reply
          0
          • L Lost User

            You need to follow some of those links and do some research. As I said, reading Word documents in C/C++ is not particularly easy, unless you are familiar with C++/CLI, in which case you can use the Microsoft.Office.Interop.Word Namespace[^]

            K Offline
            K Offline
            krishnaprasad t
            wrote on last edited by
            #5

            yes i have good experience in c++ but i have not worked on this requirements..if so i can read the data but question is how to store tht in xml format...suggestions will be greatly appreciated

            L 1 Reply Last reply
            0
            • K krishnaprasad t

              yes i have good experience in c++ but i have not worked on this requirements..if so i can read the data but question is how to store tht in xml format...suggestions will be greatly appreciated

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

              krishnaprasad t wrote:

              how to store tht in xml format

              Store what? A word document is just like a book, lots of words separated by punctuation characters. In order to store that as XML you will need to design a set of rules and tags to split the data into logical sets. Each set would probably need some attrinutes, such as font (character set, height, fixed or true-type, bold, italic etc.). Writing the final XML is just a question of using one of the XML libraries available, either Microsoft or third-party.

              1 Reply Last reply
              0
              • K krishnaprasad t

                hi..i have a requirement to write C/c++ application that converts Microsoft Word (.doc) Documents into XML format. The application should be able to receive/open a Word document and save a XMl file with the same name, but with the extension .xml..ur valuable suggestions will help me n will be appreciated..thanks

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

                I'm thinking the easiest way would be to use Office Automation.

                "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
                • L Lost User

                  You need to follow some of those links and do some research. As I said, reading Word documents in C/C++ is not particularly easy, unless you are familiar with C++/CLI, in which case you can use the Microsoft.Office.Interop.Word Namespace[^]

                  K Offline
                  K Offline
                  krishnaprasad t
                  wrote on last edited by
                  #8

                  thank u for ur reply..can u pls provide me links it would great help:-)

                  L 1 Reply Last reply
                  0
                  • K krishnaprasad t

                    thank u for ur reply..can u pls provide me links it would great help:-)

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

                    I already gave you a link to the Word Interop. You should be able to search MSDN for yourself to find other pages of interest.

                    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