form definition (.xsf) file cannot be opened because of an error

D

DuaneW

I get the following message when opening a form design previously created
with InfoPath:

Form template: O:\Methodology 2005\Cost Benefit Analysis.xsn
The form definition (.xsf) file cannot be opened because of an error.
The file cannot be validated by the XML Schema.

Element
'{http://schemas.microsoft.com/office/infopath/2003/solutionDefinition}header'
is unexpected according to content model of parent element
'{http://schemas.microsoft.com/office/infopath/2003/solutionDefinition}printSettings'.

Line 395, Position 17
<xsf:header>
----------------^
I was creating a print view and modified the page setup just before getting
this error.

Is there a way to get at the raw data to perhaps remove the print header
info? Wordpad and Notepad just brings up garbage.

Thank you.
 
S

Scott L. Heim [MSFT]

Hi Duane,

An InfoPath XSN is basically a "CAB" file that consists of other files. You
can get to these files by opening your XSN in Design View and from the File
menu choose "Extract Form Files."

Once this is done, you can open Manifest.XSF with Notepad (I would highly
encourage you to make a backup copy first!) and try to find the offending
entry.

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

DuaneW

Hi Scott,

Thanks for the quick response...it is greatly appreciated.

I'm unable to do as you say because I get the error when trying to open the
..XSN file, click ok on the error, and InfoPath never opens the file.

Thank you...Duane.
 
S

Scott L. Heim [MSFT]

Hi Duane,

Are you right-clicking on the XSN and choosing Design or just
double-clicking on the XSN?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

DuaneW

Hi Scott,

I've tried right-clicking and selecting design, double-clicking on the file
through Win Explorer, and using the open file menu option in Infopath. None
of these will open the .xsn

Thanks...duane
 
S

Scott L. Heim [MSFT]

Hi Duane,

OK - let's go to the extreme! :)

By chance, do you have WinZip? If so, you should be able to open the XSN
with WinZip since it is basically a CAB file.

Let me know if that works!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

DuaneW

Hi Scott,

Progress!!! I can open the .xsn in WinZip and I've extracted the
manifest.xsf. I copied the file and then deleted the offending entries.

How do I get the manifest.xsf back into the .xsn? WinZip won't let me update
the "zip" file because it's not a normal zip file.

Thanks...Duane.
 
S

Scott L. Heim [MSFT]

Hi Duane,

That's great to hear!

To get back to an XSN:

- Right-click on Manifest.XSF and choose Design
- From the File menu choose Save As (you will see in the File Type the only
option is XSN)
- Re-save to your XSN (please be sure you have a backup copy of the
original!)

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Shiva (GGK Tech)

Hello,

Can you give more detail what you have changed in the form? In which file
you want try to modify?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top