What's inside an InfoPath .xsn file

If you are rebuilding a form, archiving a library or just trying to understand an inherited mess, knowing what the template contains saves a lot of guessing.

An InfoPath .xsn file is a Windows cabinet (.cab) archive. Inside it are manifest.xsf, which describes the form and ties the parts together; myschema.xsd, the XML schema that defines every field; one .xsl stylesheet per view, which turns the form's XML into the layout people see; template.xml and sampledata.xml, the defaults for a new form; and optionally script files or a compiled .dll for custom code. Rename a copy to .cab to unpack it, or open it in FormArchive to see the views and fields directly.

manifest.xsf: the form definition

The manifest is the table of contents and the rulebook. It lists the views, the schema, the data connections (to SharePoint lists, web services or databases), the submit options, rules and validation, and the publish location. When you see .xsf in a folder of source files, this is it.

myschema.xsd: the fields

The schema defines the data: every field and group, its type, whether it is required and whether it repeats. Field names here are the element names in each submission, which is why they matter when you export to Excel. Forms built on an external schema or a web service may have more than one .xsd file.

view1.xsl, view2.xsl...: the layouts

Each view is an XSLT stylesheet that turns the form's XML into HTML. A form might have an entry view, a print view, a read-only approval view. These files are what make the archived PDF look like the original form. They use InfoPath-specific extensions, so a general XSLT processor renders them only partly.

template.xml, sampledata.xml and the rest

template.xml is the blank form a user starts from, with default values filled in. sampledata.xml holds the placeholder data shown in the designer. You may also find upgrade.xsl (for opening forms saved from older template versions), images used in the views, and custom code as script or a compiled assembly. That code ran inside InfoPath; nothing outside InfoPath runs it.

Open your InfoPath forms now

Drop in the template and a folder of submissions. Preview 10 forms free, on your own computer.

FAQ

How do I extract an .xsn file?

Rename a copy to .cab and open it with File Explorer, the expand command, 7-Zip or cabextract. Or open the .xsn in FormArchive.

What is an .xsf file?

It is the form definition (manifest) inside an InfoPath template. It lists the form's views, schema, rules and data connections.

Does the .xsn contain submitted forms?

No. Submissions are separate .xml files. The template only holds the design and the defaults for a new form.

InfoPath guides