I havent stored infopath document in MOSS 2007, but i have created XML
documents from a web service that can be edited in infopath. I think you
should be able to get a fair way along the path by following something
similar to what I did:
1. Create an XSD that defines the structure of your data.
2. Save the contents of the Web-page based data into an xml document that
can be successfully validated against the XSD. You must add some processing
instructions and namespaces that InfoPath expects (and uses to recognize the
document). in my case this involved adding a file based url to the installed
InfoPath form. I suspect you may need to add a http url to reference the
relevant MOSS 2007 library.
3. Save the xml document in your MOSS library ....
Since i haven't done this there may be some stuff missing but hopefully this
helps.
cheers
Wozza
The C# code i used to add processing instructions:
#region AddProcessingInstructions
/*
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution solutionVersion="1.0.0.4"
productVersion="12.0.0" PIVersion="1.0.0.0"
href="file:///P:\Projects\InfoPath%20Projects\XMLfromSQL\Publish\XMLfromSQL.xsn"
language="en-gb" ?>
<?mso-application progid="InfoPath.Document"
versionProgid="InfoPath.Document.2"?>
*/
string xsnFileName = Settings.Default.XsnFileName; // this is
currently
file:///P:\Projects\LinkUpV2\Build\Achilles.LinkUpV2.Audit.Build\Publish\ProofProtocolAuditQuestionnaire.xsn
XmlProcessingInstruction xp;
xp = xd.CreateProcessingInstruction(@"xml",
String.Format(@"version=""1.0"" encoding=""UTF-8"""));
xd.AppendChild(xp);
xp = xd.CreateProcessingInstruction(@"mso-infoPathSolution",
String.Format(@"solutionVersion=""1.0.0.4"" productVersion=""12.0.0""
PIVersion=""1.0.0.0"" href=""{0}"" language=""en-gb""", xsnFileName));
xd.AppendChild(xp);
xp = xd.CreateProcessingInstruction(@"mso-application",
String.Format(@"progid=""InfoPath.Document""
versionProgid=""InfoPath.Document.2"""));
xd.AppendChild(xp);
#endregion AddProcessingInstructions
The namespaces you need to add will probably be:
#region AddNamespaceAttributes
/*
xmlns:xd="
http://schemas.microsoft.com/office/infopath/2003"
xmlns:ns1="
http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-01-30T11:27:35"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
*/
XmlAttribute xa;
xa = xd.CreateAttribute(@"xmlns", @"xd",
"
http://www.w3.org/2000/xmlns/");
xa.InnerText =
@"
http://schemas.microsoft.com/office/infopath/2003/";
xnProtocol.Attributes.Append(xa);
xa = xd.CreateAttribute(@"xmlns", @"nsl",
"
http://www.w3.org/2000/xmlns/");
xa.InnerText =
@"
http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-01-30T11:27:35/";
xnProtocol.Attributes.Append(xa);
xa = xd.CreateAttribute(@"xmlns", @"xsi",
"
http://www.w3.org/2000/xmlns/");
xa.InnerText = @"
http://www.w3.org/2001/XMLSchema-instance/";
xnProtocol.Attributes.Append(xa);
#endregion AddNamespaceAttributes