<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: 'XDocument.DOM.selectSingleNode(...)'is null or not an object File:script'js</title><link>https://www.infopathdev.com:443/forums/thread/40048.aspx</link><pubDate>Thu, 26 Mar 2009 19:29:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40048</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40048.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40048</wfw:commentRss><description>&lt;p&gt;Catching this up to our email thread -- the namespaces are incorrect in the xpath. If you don&amp;#39;t have IP 2007 with its wonderful Copy XPath capability, you can save your form as source files and look at template.xml in a text editor to see what the correct namespaces are for your xpath. &lt;/p&gt;</description></item><item><title>'XDocument.DOM.selectSingleNode(...)'is null or not an object File:script'js</title><link>https://www.infopathdev.com:443/forums/thread/40034.aspx</link><pubDate>Thu, 26 Mar 2009 16:34:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40034</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40034.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40034</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;I am getting the below&amp;nbsp;error whan trying to access a field on my form.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;XDocument.DOM.selectSingleNode(...)&amp;#39;is null or not an object File:script&amp;#39;js&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My namespace is set as...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;XDocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-03-24T12:18:15&amp;quot; xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;#39;); &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;my code is...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;XDocument.DOM.selectSingleNode( &amp;quot;/dfs:myFields/my:LastName&amp;quot; ).text = &amp;quot; &amp;quot;;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My Datasource looks like this...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;myFields&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; LastName&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; FirstName&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Does anyone see what I am doing wrong...I know it is a simple fix?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>