How to convert .doc file to xml file
i need to convert word document to xml file to use it in my c# application in the help button
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
selva kumarRank #2,987 · 483 reputationPosted Oct 10, 2013, 3:38 AM EDT
http://forums.asp.net/t/1709976.aspx
http://www.dotnetfunda.com/forums/show/9322/how-to-convert-word-to-xml-in-csharp
Ring ZhongRank #6,843 · 255 reputationPosted Oct 11, 2013, 12:34 AM EDT
the full code here
using System;
using System.Windows.Forms;
using Spire.Doc;
using Spire.Doc.Documents;
namespace toXML
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//Create word document
Document document = new Document();
document.LoadFromFile(@"D:\Sample.doc");
//Save doc file.
document.SaveToFile("Sample.xml", FileFormat.Xml);
//Launching the MS Word file.
WordDocViewer("Sample.xml");
}
private void WordDocViewer(string fileName)
{
try
{
System.Diagnostics.Process.Start(fileName);
}
catch { }
}
}
}
the original tutorial here http://www.e-iceblue.com/Knowledgebase/Spire.Doc/Program-Guide/How-to-Convert-Word-Document-to-XML.html
Posted Mar 31, 2014, 12:31 AM EDT
Abhijeet SinghRank #415 · 6K reputationPosted Mar 31, 2014, 2:44 AM EDT
http://stackoverflow.com/questions/11932163/how-to-convert-doc-docx-into-a-single-xml-file-automatically
It may help you.
Kurt Ambrose127 reputationPosted Apr 30, 2021, 10:49 AM EDT
Using the LEADTOOLS SDK you could perform the conversion of several document types include MS Word Doc to XML through the use of the DocumentConverter class. Do note this is a paid for SDK and I work for this vender.
Below is a link to a small tutorial to convert files in a Console C# application
https://www.leadtools.com/help/sdk/v21/tutorials/dotnet-console-convert-files-with-the-document-converter.html