<?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>VBScript proc to read data from doc tree</title><link>https://www.infopathdev.com:443/forums/thread/12982.aspx</link><pubDate>Thu, 16 Nov 2006 19:10:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12982</guid><dc:creator>tcarnahan_rei</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12982.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12982</wfw:commentRss><description>I am new to InfoPath. I am using 2003 version. I need to create a  button on my form with code procedure behind it(I know how to do this part) written in VBScript (my background is in VB) that when the user fills out the form and clicks on it, it will:&lt;br /&gt;&lt;br /&gt;- Find the root of the internal datastore (What I mean is I am &lt;u&gt;not&lt;/u&gt;connected to a database or webservice.&lt;br /&gt;- Traverse down the document tree visiting every child node&lt;br /&gt;- At every node, read the name of the node, it's data type, and the value the user just typed into it.&lt;br /&gt;- Return the same to the calling procedure&lt;br /&gt;&lt;br /&gt;What I need to do with this data is not relevant to the discussion, but I need a generic procedure that can be used in any InfoPath form(i.e. does not assume to know any nodes in advance).&lt;br /&gt;&lt;br /&gt;I have found a couple of articles where people have done this with JScript, Javascript, or Java from a HTML document to do this but I am having difficulty converting it to my preference, VBScript.&lt;br /&gt;&lt;br /&gt;Would anyone have an example of how to do something like this  in VBScript?&lt;br /&gt;&lt;br /&gt;Thank you ahead of time for any help you can provide!&lt;br /&gt;</description></item></channel></rss>