<?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 Error</title><link>https://www.infopathdev.com:443/forums/thread/29179.aspx</link><pubDate>Wed, 04 Jun 2008 19:30:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29179</guid><dc:creator>JillErin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29179.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29179</wfw:commentRss><description>&lt;p&gt;Thank you!&amp;nbsp; That helped with the whole xDocument error.&amp;nbsp; However, now I&amp;#39;m getting errors about the values&amp;nbsp;not being able to convert&amp;nbsp;to a string (and vice versa).&lt;/p&gt;</description></item><item><title>Re: XDocument Error</title><link>https://www.infopathdev.com:443/forums/thread/29137.aspx</link><pubDate>Tue, 03 Jun 2008 20:04:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29137</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29137.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29137</wfw:commentRss><description>&lt;p&gt;I am using infopath 2007 but most of my code is backward compatible with 2003.&amp;nbsp; If you are writing the code to be compatible with 2007, then I don&amp;#39;t think you use xDocument.&amp;nbsp; In my vb.net code when referring to a text box I use: thisXDocument.DOM(&amp;quot;xpath-to-field&amp;quot;).text.&lt;/p&gt;
&lt;p&gt;In your case I think you need to use something like this:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; field1 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; XPathNavigator = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:field1&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager)&lt;/p&gt;&lt;/font&gt;</description></item><item><title>XDocument Error</title><link>https://www.infopathdev.com:443/forums/thread/29136.aspx</link><pubDate>Tue, 03 Jun 2008 18:52:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29136</guid><dc:creator>JillErin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29136.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29136</wfw:commentRss><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I just made my first real form with Infopath, and I want to add a field that will automatically generate a numeric code based on a name in a different text box.&amp;nbsp; I found code that does this with a case statement.&amp;nbsp; However, I am being told that &amp;quot;XDocument&amp;quot; needs to be declared.&lt;/p&gt;Here is the line: &lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;fieldProduct = XDocument.DOM.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:ProductName&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).text&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I am using the Microsoft Visual Studio Tools for Applications, InfoPath 2007, and VBScripting.&amp;nbsp; I&amp;#39;ve only just started learning different scripts for work, so I wouldn&amp;#39;t be surprised if&amp;nbsp;the solution is&amp;nbsp;something simple.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Thank you!&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>