<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Create new item in SP form library by code</title><link>https://www.infopathdev.com:443/forums/thread/16590.aspx</link><pubDate>Thu, 08 Feb 2007 17:09:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16590</guid><dc:creator>Kun</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16590.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16590</wfw:commentRss><description>That means I have to extract the .xsn file and use the schema definition in this cab file? Is there any code snippet how this works?</description></item><item><title>Re: Create new item in SP form library by code</title><link>https://www.infopathdev.com:443/forums/thread/16589.aspx</link><pubDate>Thu, 08 Feb 2007 17:03:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16589</guid><dc:creator>ekzarov</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16589.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16589</wfw:commentRss><description>Ofcource you need to have some schema, wich describes your template file. You may use your form library template to get this xml file instead webSite.Folders[libraryName].Files[0]...</description></item><item><title>Create new item in SP form library by code</title><link>https://www.infopathdev.com:443/forums/thread/15542.aspx</link><pubDate>Wed, 07 Feb 2007 18:23:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15542</guid><dc:creator>Kun</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15542.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15542</wfw:commentRss><description>How can I write custom code that creates a new item in a Sharepoint form library? The only way I find out is to open an existing item via the object model and modify its nodes. But what can I do if no file exists?&lt;br /&gt;&lt;br /&gt;This is my current approach (that uses an existing file to create a new one):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;            SPFile spTemplate = webSite.Folders[libraryName].Files[0];&lt;br /&gt;&lt;br /&gt;            // reads the blank file into an xml document&lt;br /&gt;            MemoryStream inStream = new MemoryStream(spTemplate.OpenBinary());&lt;br /&gt;            XmlTextReader reader = new XmlTextReader(inStream);&lt;br /&gt;            XmlDocument xd = new XmlDocument();&lt;br /&gt;            xd.Load(reader);&lt;br /&gt;            reader.Close();&lt;br /&gt;            inStream.Close();&lt;br /&gt;&lt;br /&gt;            XPathNavigator xpn = xd.CreateNavigator();&lt;br /&gt;&lt;br /&gt;            xpn.SelectNode(...).SetValue(newValue);&lt;br /&gt;&lt;/pre&gt;</description></item></channel></rss>