How to make InfoPath 2010 open XML files

Applies to: InfoPath 2010

Learn how you can use InfoPath Filler 2010 to open XML files that are not InfoPath forms and that were not created using InfoPath.


Suppose you have a whole bunch of XML files that at one point in time were created by a legacy system.

All of these XML files have a similar structure, that is, they have the same XML schema definition.

Now you want to use InfoPath 2010 to open and view the data stored in these XML files.

The first thing you must do is take one of the XML files and use it to create an InfoPath form template as follows:

  1. Open InfoPath 2010, and then on the File > New tab double-click XML or Schema.
  2. On the Data Source Wizard, browse to and select the XML file to use to create the form template, and click Next.
  3. On the Data Source Wizard, leave No selected, and click Finish.
  4. Click Yes to accept that the structure of the XML file will be used to provide the data source.
  5. Design your form template by placing controls on it and then publish it.

What makes an XML file an InfoPath form or document is the mso-application XML processing instruction with a progid of InfoPath.Document that is present at the top of the XML file.

Once you have designed and published the InfoPath form template, you can associate an XML file you want to open and view with the form template you created as follows:

  1. Open InfoPath Filler 2010, and then click File > Open.
  2. Browse to and select the XML file to open.
  3. When the Open With Form Template dialog box (Select the form template to open this XML file) pops up, click Browse to browse to and select the InfoPath form template you created, select the Always use this form template for this file check box, and click OK.
  4. Save the XML file.

The necessary InfoPath XML processing instructions should have been added to the XML file, so the next time you want to open the XML file, you can double-click the file in Windows Explorer and it should automatically open in InfoPath Filler 2010.


Related InfoPath Articles:


Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.