<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Retrieve data from infopath from libraries in Sharepoint</title><link>https://www.infopathdev.com:443/forums/thread/42098.aspx</link><pubDate>Wed, 27 May 2009 03:37:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42098</guid><dc:creator>sathiyapriyan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42098.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=42098</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m using the same code nut i got an error in the line of &amp;quot;byte[] formData = Convert.FromBase64String(formStream.Value);&amp;quot; as &amp;quot;Object reference not set to an instance of an object&amp;quot;.&lt;/p&gt;
&lt;p&gt;From this line &amp;quot;XPathNavigator formStream = root.SelectSingleNode(&amp;quot;//*[local-name() = &amp;#39;Stream&amp;#39;]&amp;quot;);&amp;quot; , i got the formStraem as null. why am i get like this. help needed urgently&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Retrieve data from infopath from libraries in Sharepoint</title><link>https://www.infopathdev.com:443/forums/thread/42020.aspx</link><pubDate>Mon, 25 May 2009 08:50:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42020</guid><dc:creator>Samir Farid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42020.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=42020</wfw:commentRss><description>&lt;p&gt;Hi Agamenon,&lt;/p&gt;
&lt;p&gt;If your DataSource looks like this:&lt;/p&gt;
&lt;p&gt;myFields&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Titulo&lt;/p&gt;
&lt;p&gt;Then you have to change this piece of code:&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;br /&gt;// Retrieve the name of the form from the current row&lt;br /&gt;string formName = e.Source.CreateNavigator().SelectSingleNode(&amp;quot;@Titulo&amp;quot;, NamespaceManager).Value;&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;With this,&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;br /&gt;// Retrieve the name of the form from the current row&lt;br /&gt;string formName = e.Source.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:Titulo&amp;quot;, NamespaceManager).Value&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Retrieve data from infopath from libraries in Sharepoint</title><link>https://www.infopathdev.com:443/forums/thread/41790.aspx</link><pubDate>Fri, 15 May 2009 20:33:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41790</guid><dc:creator>Agamenon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41790.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=41790</wfw:commentRss><description>Hi all, i try this code that i found:


// Get the connection to the SharePoint library&lt;br /&gt;
SharepointListQueryConnection spsConn = &lt;br /&gt;
(SharepointListQueryConnection)DataSources[&amp;quot;Datasource&amp;quot;].QueryConnection;&lt;br /&gt;
&lt;br /&gt;
// Retrieve the name of the form from the current row&lt;br /&gt;
string formName = e.Source.CreateNavigator().SelectSingleNode(&amp;quot;@Titulo&amp;quot;, NamespaceManager).Value;&lt;br /&gt;
&lt;br /&gt;
// Generate the URL to the form&lt;br /&gt;
string formUrl = String.Format(&amp;quot;{0}{1}/{2}&amp;quot;, spsConn.SiteUrl, spsConn.Name, formName);&lt;br /&gt;
&lt;br /&gt;
// Get an XPathNavigator object to the GetItem method of the Copy web service&lt;br /&gt;
XPathNavigator root = DataSources[&amp;quot;GetItem&amp;quot;].CreateNavigator();&lt;br /&gt;
&lt;br /&gt;
// Set the Url parameter on the GetItem method&lt;br /&gt;
root.SelectSingleNode(&amp;quot;//*[local-name()=&amp;#39;Url&amp;#39;]&amp;quot;).SetValue(formUrl);&lt;br /&gt;
&lt;br /&gt;
// Call the web service&lt;br /&gt;
DataSources[&amp;quot;GetItem&amp;quot;].QueryConnection.Execute();&lt;br /&gt;
&lt;br /&gt;
// Get the byte array stream of the form from the web service response&lt;br /&gt;
XPathNavigator formStream = root.SelectSingleNode(&amp;quot;//*[local-name() = &amp;#39;Stream&amp;#39;]&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Convert the base64 encoded string for the form into a byte array&lt;br /&gt;
byte[] formData = Convert.FromBase64String(formStream.Value);&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
Once you&amp;#39;ve converted the base64 encoded string for the form&lt;br /&gt;
into a byte array, you can do whatever you like with that&lt;br /&gt;
byte array. Here we will continue converting it to a string and&lt;br /&gt;
then create a temporary file of that string so that we can open&lt;br /&gt;
the temporary file in InfoPath.&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
// Convert the form&amp;#39;s byte array into a string&lt;br /&gt;
string formString = string.Empty;&lt;br /&gt;
using (MemoryStream ms = new MemoryStream(formData, false))&lt;br /&gt;
{&lt;br /&gt;
using (StreamReader sr = new StreamReader(ms, Encoding.UTF8))&lt;br /&gt;
{&lt;br /&gt;
formString = sr.ReadToEnd();&lt;br /&gt;
sr.Close();&lt;br /&gt;
}&lt;br /&gt;
ms.Close();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Create a temporary file to write the text of the form to&lt;br /&gt;
string tempFileName = Path.GetTempFileName();&lt;br /&gt;
using (FileStream fs = new FileStream(tempFileName, FileMode.Open, FileAccess.ReadWrite))&lt;br /&gt;
{&lt;br /&gt;
using (StreamWriter sw = new StreamWriter(fs))&lt;br /&gt;
{&lt;br /&gt;
sw.Write(formString);&lt;br /&gt;
sw.Flush();&lt;br /&gt;
sw.Close();&lt;br /&gt;
}&lt;br /&gt;
fs.Close();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Open the temporary file for the form in a new instance of InfoPath&lt;br /&gt;
Application.XmlForms.Open(tempFileName);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;


I  create the datasources for get list and put GetLIst work, and i define this in code:

using System.IO;
using System.Text;

but i got this mesage:

Exception Message: Object reference not set to an instance of an object

the fail in this line:
string formName = e.Source.CreateNavigator().SelectSingleNode(&amp;quot;@Titulo&amp;quot;, NamespaceManager).Value;


thanks for help</description></item><item><title>Retrieve data from infopath from libraries in Sharepoint</title><link>https://www.infopathdev.com:443/forums/thread/41733.aspx</link><pubDate>Thu, 14 May 2009 20:25:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41733</guid><dc:creator>Agamenon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41733.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=41733</wfw:commentRss><description>Hi, I have a Sharepoint Services with a list with Infopath templates containing data. I need to take this data and process and generate a txt file in automated mode, only a front or other infopath formulary when I can choose the infopath file to process. What is the most common procedure to do this? Thank for help!</description></item></channel></rss>