<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Accessing XSN programmatically</title><link>https://www.infopathdev.com:443/forums/thread/34921.aspx</link><pubDate>Wed, 26 Nov 2008 00:50:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34921</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34921.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34921</wfw:commentRss><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;What exactly do you want to do? Is it just updating the schema (XSD) and sampledata/template.xml? What about the view? Usually, for these &amp;quot;data driven&amp;quot; forms, we find that a very generic view is required with a lot of hide/show. We have done data driven XSNs before where the schema is normalized and the XSN is designed to allow any kind of node. The resulting XML data gets created on submit. In this way, one XSN can handle any number of schemas, but the view must be designed in a way to allow variable length sections and that means making it lay out vertically which presents some look-and-feel limitations. It&amp;#39;s fine for online surveys and things like that, but not for *typical* paper forms. For example, try doing the IRS 1040 ES in a vertical layout and most of your users won&amp;#39;t know what the form is because it stopped looking like the form they were used to seeing. &lt;/p&gt;
&lt;p&gt;If it&amp;#39;s a limited application, we&amp;#39;d be happy to look into it for you. Best of luck!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Accessing XSN programmatically</title><link>https://www.infopathdev.com:443/forums/thread/34920.aspx</link><pubDate>Wed, 26 Nov 2008 00:25:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34920</guid><dc:creator>danieln</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34920.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34920</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Patrick,&lt;/p&gt;&lt;p&gt;Thank you for answering.&lt;/p&gt;&lt;p&gt;Actually this matter is quite important, I will forward your suggestion to my managers.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Any way, the best way to do it would probably be to deal with the xml changes ourselves... &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Accessing XSN programmatically</title><link>https://www.infopathdev.com:443/forums/thread/34918.aspx</link><pubDate>Tue, 25 Nov 2008 23:56:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34918</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34918.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34918</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;The XSN is just a cab file. You can use the Cab tools to programmatically &amp;quot;package&amp;quot; together an XSN but as Shiva suggests, it&amp;#39;s very dangerous. That&amp;#39;s because the manifest.xsf should also be updated in the correct way. If it&amp;#39;s just an XSD change (an addition of a node), you can do it by saving the files as source (or uncabbing them by renaming the XSN as CAB and double clicking the CAB to get the files out), modifying the XSD and re-cab the form by using MakeCAB or some other utility. But, as you have found out, if you don&amp;#39;t modify SampleData and Template.xml it won&amp;#39;t necessarily work. &lt;/p&gt;
&lt;p&gt;There is no object model for the InfoPath template. We are looking into creating one, but it&amp;#39;s a lot of work, and while we get the request about once every 2-3 months, nobody wants to pay us to do it yet, so we&amp;#39;re being lazy. Maybe in 6 months we&amp;#39;ll have something for you. On the other hand, if you&amp;#39;d like to see something sooner, and have a checkbook, let me know and we can talk. :)&lt;/p&gt;</description></item><item><title>Re: Accessing XSN programmatically</title><link>https://www.infopathdev.com:443/forums/thread/34893.aspx</link><pubDate>Tue, 25 Nov 2008 13:51:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34893</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34893.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34893</wfw:commentRss><description>&lt;pre&gt;Hello Welcome to the Forums,&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;If we want we get any file using programmatically. But we can&amp;#39;t change the .xsn file data or any modification will not save in those files. &lt;/pre&gt;&lt;pre&gt;Whatever changes we want to do those should be apply in design mode of the InfoPath. While updating the schema some time it will not reflect in template.xml and sample,xml files. For this we have to add by manually for those new fields in those files.&lt;/pre&gt;</description></item><item><title>Accessing XSN programmatically</title><link>https://www.infopathdev.com:443/forums/thread/34792.aspx</link><pubDate>Mon, 24 Nov 2008 11:50:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34792</guid><dc:creator>danieln</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34792.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34792</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello,&lt;/p&gt;&lt;p&gt;I want to open a form template (.xsn) in infopath in &lt;b&gt;design mode&lt;/b&gt; programatically and save it. This is due to the fact that I change the XSD from outside infopath and I have to save/publish the xsn so that the other files in the xsn will be automatically updated (sampledata.xml, template.xml etc.).&lt;/p&gt;&lt;p&gt;The API toolkit for .NET framework provides a reference to the XDocumentsCollection (the xml form files), but I didn&amp;#39;t find a way to retrieve a reference to a template.&lt;/p&gt;&lt;p&gt;Is there a way to solve my problem?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;&lt;p&gt;Daniel &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>