To base a form on a schema, you begin when you start designing the form, by clicking the New from XML Document or Schema link in the Design a Form task pane. Next, use the Data Source Wizard to browse for and locate a specific XML schema.
After you close the wizard, you'll see groups and fields that represent the schema in the Data Source task pane (more on this in the next section).
Note If you want to use an XML file as a source, but for some reason it lacks a schema, go ahead. InfoPath will create a schema based on the XML file that you use.