JSON to Word fill

How to Convert XML to Word

Posted by on 23rd July 2017

XML Merge

Many of us are familiar with mail merge - merging Excel data with word documents. How about merging XML to Word? XML is the universal standard for data interchange and Microsoft Word is the most popular document format. Often times you find a need to populate XML file to word document. Let me narrate my own experience.

 

Why convert XML to Word

Once I landed in a situation, where I had to fill a word template with an XML file to generate a document that was to be shared with vendors. The word document has corporate branding-Header, Footer, Logo etc. and contained around 15 dynamic fields. Over a period of time, the number of XML files I received per day started increasing. It reached 5-6 XML files per day, which translates to manual filling of documents by cut-and-paste 5-6 times a day. You can imagine how frustrating and painful this tedious job is.

Then I started searching for software/tools to automate this task. Unfortunately, I couldn’t find a simple tool that addresses my requirement but only came across APIs, code samples, and libraries i.e. all geeky stuff. I used one of the libraries and did some coding to convert XML to Word.

I am sure some of you would have came across these situations with XML files in your day-to-day business.

1. Your CRM allows you to export data in XML format and you want to export that data into your proposal template to create proposals real fast.

2. You export data from your Database in XML format and want to export that into a Word document as per your company’s branding guidelines

3. You receive a customer response in XML format and want to populate that data into a word template for companywide distribution.

Whatever be the scenario, converting XML to Word brings in lot of productivity gains and reduce manual errors.

Approaches

 

There are different approaches to achieve this. Most common of them is “Save As” xml file as Microsoft word and cut-and-paste data that into template. This has limited usefulness mainly for converting xml file into a readable format. As you can see, it's a manual fill and not really auto populating XML to Word in true sense. Another familiar approach is to employ IT team to build a tool for populating XML to Word document. This is an expensive option both from development and maintenance perspective.

EDocGen is perfect solution to convert XML to Word.

EDocGen is DIY SAAS software for populating XML to Word document. The best part is users can use existing document templates for document generation. It doesn't force users to switch to system's templates/formats or build templates in proprietary tools. In few clicks, convert existing document into template and auto fill it with XML data to generate documents. EDocGen supports both individual and batch document generation. Following sections describe how to convert XML to Word using EDocGen.

 

Document Generation Steps

Step1:

First step is to upload existing word template into EDocGen. If your document is EDocGen template ready, great. If not, you can convert it in few clicks. Click on "Edit Document" action button on document to open document editor.

Step 2:

Next step is to adjust XML file structure according to template. Let me explain with an example, on how to go about it. The below template has dynamic tables and text, whose values are to be populated with XML.

Personal Details

{Enter Name}

{Enter Father's Name}

{Enter DOB}

{Enter Profession}

Name

Age

Address

{#details} {name}

{age}

{address} {/details}

 

The XML file for auto-filling this template to generate document(s) is as below.

XML File for template

 

You can use this example to create XML file for your template. We will be coming up with mapping tool for mapping dynamic fields in word document to XML tags in next release.

 

Step3:

Hover over document template to see “Create Document” action button. Click on it and in the drop down select “generate documents from XML. Upload XML to generate documents.

XML to Word Document Generation

As you can see, EDocGen is Windows OpenXML based solution that supports filling of dynamic text, tables and images from XML data into document templates.It is the simplest and fastest solution to convert XML to Word, online or through API. Register and start populating XML to Word templates.

Popular Posts

Auto Fill JSON to Word

Posted by admin

Mail Merge is one of the most popular features of Microsoft Office. Mail merge merges Excel

NextGen Document Generator

Posted by admin

Will you ever fill a document manually, if there is a choice to use a system/tool that