Design a form based on an existing XML document

Microsoft Office InfoPath

Show All Show All

Design a form based on an existing XML document

When designing a new form based on an existing XML document, you can work with the form in the same way as when you design a new blank form, including inserting and laying out controls, inserting and modifying fields and groups in the data source, adding data validation and conditional formatting, and publishing the form.

Note  When you design a form based on an existing XML document, Microsoft Office InfoPath 2003 creates a data source based on the information in your .xml file. The more detailed your XML document is, the more detailed the resulting data source will be.

  1. On the File menu, click Design a Form.
  2. In the Design a Form task pane, click New from Data Source.
  3. On the first page of the Data Source Setup Wizard, click XML Schema or XML data file, and then click Next.
  4. On the second page of the Data Source Setup Wizard, click Browse, and then, in the Open dialog box, browse to and select the XML document you want to base the form on.
  5. In the Data Source Setup Wizard, click Finish.
  6. In the dialog box that appears, do one of the following:
    • If you want to use the values in the XML document to create default data for your form, click Yes. The values stored in the XML document will become the default values for the fields in your form.
    • If you want to use only the structure of the XML document and not its values, click No.
  7. To begin adding controls to the form, right-click a field or group in the Data Source task pane, and then, on the shortcut menu, click the control you want to insert.