How do I convert .docx or .doc files to XML format just like converting from Word 2003?

WooHyeok Kim 0 Reputation points
2024-03-19T06:38:44.18+00:00

"I'm working on converting a document created in the 2003 version to XML format from 2003. How do I convert .docx or .doc files to XML format just like converting from Word 2003? Or which library should I use?"

Word
Word
A family of Microsoft word processing software products for creating web, email, and print documents.
664 questions
Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,316 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,507 questions
{count} votes

3 answers

Sort by: Most helpful
  1. EMERICK GIBERNE 1 Reputation point
    2024-03-19T10:46:07.02+00:00
    1. Go to, Save a Copy.
    2. Enter file name.
    3. Select, one of these extensions:
      • Word XML Document (*.xml) > XML plain text file; Notepad editing.
      • Strict Open XML Document (*.docx) > XML-based file; No Notepad editing.
      • Word 2003 XML Document (*.xml) > XML-based file; No Notepad editing.

  2. WooHyeok Kim 0 Reputation points
    2024-03-20T00:03:49.6866667+00:00

    It needs to be automatically converted into a document


  3. Mickey7877-7284 1 Reputation point
    2024-04-18T08:07:26.7+00:00

    If you are looking for a .NET library to convert .docx or .doc files to XML format, you can try the Spire.Doc library.

    using System;
    using Spire.Doc;
    
    namespace WordtoXML
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                //Create an object of Document class
                Document document = new Document();
    
                //Load a .doc or .docx document from disk
                document.LoadFromFile(@"D:\test\test.docx");
    
                //Save the Word document as an XML file
                document.SaveToFile("Sample.xml", FileFormat.Xml);
            }
        }
    }
    
    0 comments No comments