<?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: Dynamic file nave for saving</title><link>https://www.infopathdev.com:443/forums/thread/20838.aspx</link><pubDate>Fri, 15 Jun 2007 14:56:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20838</guid><dc:creator>romaik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20838.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20838</wfw:commentRss><description>&lt;p&gt;First, i made a mistake in the thread title : it&amp;#39;s name and not nave&lt;/p&gt;&lt;p&gt;&amp;nbsp;Second : I found the solution :&lt;/p&gt;&lt;p&gt;&amp;quot;var path = &amp;quot;D:\\&amp;quot;
	&lt;/p&gt;&lt;p&gt;path += XDocument.GetDOM(&amp;quot;observer&amp;quot;).selectSingleNode(&amp;quot;//projet&amp;quot;).text
	&lt;/p&gt;&lt;p&gt;path += &amp;quot;.xml&amp;quot;
	&lt;/p&gt;&lt;p&gt;XDocument.SaveAs(path)&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I guess I could do it in one line, but I generally don&amp;#39;t like overloaded lines :p&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Dynamic file nave for saving</title><link>https://www.infopathdev.com:443/forums/thread/20830.aspx</link><pubDate>Fri, 15 Jun 2007 12:17:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20830</guid><dc:creator>romaik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20830.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20830</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;I am currently working with InfoPath 2003 and I have a problem using a button.&lt;/p&gt;&lt;p&gt;I created a button and its purpose is to save the form in a path with a name that contains data from a secondary data source.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My code would be un JScrit (the default languge behind a button in fact) : &lt;/p&gt;&lt;p&gt;function CTRL144_5::OnClick(eventObj)
{
	&lt;/p&gt;&lt;p&gt;XDocument.SaveAs(&amp;quot;D:\\&amp;quot;+xdXDocument:GetDOM(&amp;quot;observer&amp;quot;)/observer/projet+&amp;quot;.xml&amp;quot;)
	&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;But it does not work. (If I put : XDocument.SaveAs(&amp;quot;D:\\test.xml&amp;quot;, it works)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any idea ?&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;EDIT : observer is one of my secondary data source&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>