How to make InfoPath 2010 open XML files
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:
- Open InfoPath 2010, and then on the File > New tab double-click XML or Schema.
- On the Data Source Wizard, browse to and select the XML file to use to create the form template, and click Next.
- On the Data Source Wizard, leave No selected, and click Finish.
- Click Yes to accept that the structure of the XML file will be used to provide the data source.
- 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:
- Open InfoPath Filler 2010, and then click File > Open.
- Browse to and select the XML file to open.
- 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.
- 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.
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 of S.Y.M. Wong-A-Ton. 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, S.Y.M. Wong-A-Ton.
Related InfoPath Articles:
- How to open an InfoPath form and template that were moved or copied
- Create a data connection to an XML file in InfoPath 2010
- Attach an InfoPath form to a SharePoint list item (no code)
- How to convert an InfoPath 2003 form template to InfoPath 2010
- 5 InfoPath questions about controls, XML, and Excel