<?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: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31576.aspx</link><pubDate>Wed, 20 Aug 2008 15:05:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31576</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31576.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31576</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;That worked a treat for the single node, but unfortunately, there are three repeating nodes in there that all get added to by this function. Only the&amp;nbsp;one at the bottom allows appendChild to work.&amp;nbsp;From what you said I went hunting for something that inserts XML in a certain place assuming that the DOM is restricting me to keeping all UID, HWID and SWID items together. I found a number of references to an InsertAfter method to replace the appendChild method (code to follow) but apparently this isn&amp;#39;t supported in VBScript.&lt;/p&gt;
&lt;p&gt;Does anyone know of an alternative that I can use to get this working?&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Ben&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; addDomElement(objParentNode, strName, strValue)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; objNode = XDocument.Dom.createNode(&amp;quot;element&amp;quot;, strName, &amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-08T16:31:56&amp;quot;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;font size="2"&gt; strValue &amp;lt;&amp;gt; &amp;quot;&amp;quot; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/font&gt;&lt;font size="2"&gt; objNode.Text = strValue&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; existingObjNode = objParentNode.selectNodes(strName)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;font size="2"&gt; existingObjNode.length &amp;gt; 0 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; existingObjNode = existingObjNode.item(existingObjNode.length -1)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;existingObjNode.ParentNode.InsertAfter objNode, existingObjNode &lt;font color="green"&gt;&amp;#39;ERROR HERE: InsertAfter is not a recognised method&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Else&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;objParentNode.appendChild objNode&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31539.aspx</link><pubDate>Tue, 19 Aug 2008 17:01:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31539</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31539.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31539</wfw:commentRss><description>&lt;p&gt;Try this: in your data source, move my:UID &lt;strong&gt;below&lt;/strong&gt; my:Info, so it is the last field in the group. When I tried that, the error stopped popping. &lt;a href="http://www.infopathdev.com/forums/t/5373.aspx"&gt;This&lt;/a&gt; poster had the same issue....&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31535.aspx</link><pubDate>Tue, 19 Aug 2008 15:22:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31535</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31535.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31535</wfw:commentRss><description>&lt;p&gt;They keep us quite effectively locked down around here!&lt;/p&gt;
&lt;p&gt;It was attached to a previous post: &lt;a href="http://www.infopathdev.com/forums/storage/45/31513/ARSR%20Public.xsn"&gt;http://www.infopathdev.com/forums/storage/45/31513/ARSR%20Public.xsn&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31530.aspx</link><pubDate>Tue, 19 Aug 2008 11:33:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31530</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31530.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31530</wfw:commentRss><description>&lt;p&gt;I think I see the confusion now -- I&amp;#39;d intended for you to reply to my email with the file. You can also place it in the community uploads section of the Downloads on this site. &lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31528.aspx</link><pubDate>Tue, 19 Aug 2008 08:24:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31528</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31528.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31528</wfw:commentRss><description>&lt;p&gt;Unfortunately not... the filter stops zip files as well. Did the XSN attached to the previous post work?&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31515.aspx</link><pubDate>Mon, 18 Aug 2008 17:50:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31515</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31515.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31515</wfw:commentRss><description>&lt;p&gt;If you right click your xsn and select send to --&amp;gt; compressed folder (Windows XP), you can create a zip that your email filter will hopefully ignore.&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31513.aspx</link><pubDate>Mon, 18 Aug 2008 16:06:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31513</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31513.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31513</wfw:commentRss><description>&lt;p&gt;Thanks for your e-mail Hilary. Unfortunately, I can not send XSN files out by e-mail. The filter thinks it&amp;#39;s ActiveX. I have removed all data connections (potential privacy problems at work), but if you add two users on the user view and click &amp;quot;go forward to order&amp;quot; you will see where the error crops up. Hopefully this will help explain my issue. I just can&amp;#39;t seem to crack it!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Ben&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31504.aspx</link><pubDate>Mon, 18 Aug 2008 07:58:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31504</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31504.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31504</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m still getting problems with createNode. When I try it without a namespaceURI it tells me the prefix &amp;quot;my&amp;quot; is not defined, but I have read the &lt;a class="" title="MS KB 296492" href="http://support.microsoft.com/kb/296492" target="_blank"&gt;MS article&lt;/a&gt; and checked the template and xmlns:my is defined in there.&lt;/p&gt;
&lt;p&gt;Element &amp;#39;{http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-08T16:31:56}UID&amp;#39; is unexpected according to content model of parent element &amp;#39;{http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-08T16:31:56}Order&amp;#39;.&lt;/p&gt;
&lt;p&gt;The bit in the curly brackets is the NamespaceURI of &amp;quot;my&amp;quot; as defined in the template which is what the parser spewed out when I guessed it, so I tried using that string and still it isn&amp;#39;t working!&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; addDomElement(objParentNode, strName, strValue)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set&lt;/font&gt;&lt;font size="2"&gt; objNode = XDocument.Dom.createNode(&amp;quot;element&amp;quot;, strName, &amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-08T16:31:56&amp;quot;)&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/font&gt;&lt;font size="2"&gt; strValue &amp;lt;&amp;gt; &amp;quot;&amp;quot; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/font&gt;&lt;font size="2"&gt; objNode.Text = strValue&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objParentNode.appendChild objNode&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;End Sub&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I really don&amp;#39;t know where I&amp;#39;m going wrong here. The MSDN help articles leave the NamespaceURI blank which is of no use to me because that just gives me this error:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Reference to undeclared namespace prefix: &amp;#39;my&amp;#39;.&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31503.aspx</link><pubDate>Mon, 18 Aug 2008 06:50:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31503</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31503.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31503</wfw:commentRss><description>&lt;p&gt;Thanks Hilary. Unfortunately, our AUP restrictions&amp;nbsp;stop me getting&amp;nbsp;on to that link but I&amp;#39;ll go hunting for the createNode method. Thanks again.&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31502.aspx</link><pubDate>Mon, 18 Aug 2008 01:09:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31502</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31502.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31502</wfw:commentRss><description>&lt;p&gt;Sadly, I&amp;#39;m barely fluent in VBscript. I&amp;#39;d guess by the error that you need to set the namespace property for the new node? I&amp;#39;m not sure. I found &lt;a href="http://www.bokebb.com/dev/english/1990/posts/199085136.shtml"&gt;this&lt;/a&gt; post when I went searching for examples of the createElement method, but his main suggestion seemed to be to use the createNode method instead.&lt;/p&gt;
&lt;p&gt;Sorry, wish I could be of more help....&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31484.aspx</link><pubDate>Fri, 15 Aug 2008 12:03:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31484</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31484.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31484</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m still patiently waiting for my boss to sign it off! Until then it&amp;#39;s the standard 2003 script editor. I don&amp;#39;t know how I ever programmed without Intellisense before!&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if this is a different context, but I&amp;#39;m still having a couple of problems with this.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to check the length of the nodes once I have found them and then add to their length until they match the length of another done. I am getting the following error:&lt;/p&gt;
&lt;p&gt;The namespace prefix my in the following element does not map to a URI: my:UID&lt;/p&gt;
&lt;p&gt;It&amp;#39;s obviously called my:UID otherwise it wouldn&amp;#39;t even call that sub in the first place! Any ideas?&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; btnJumpOrder_OnClick(eventObj)&lt;/p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; oNode = XDocument.Dom.selectNodes (&amp;quot;/my:myFields/my:Order&amp;quot;)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;font size="2"&gt; orderIsFresh(oNode) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; i, iNode&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; uNode = XDocument.Dom.selectNodes (&amp;quot;/my:myFields/my:Users&amp;quot;)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;&amp;#39;There is only one order&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; iNode = oNode.item(0)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;For&lt;/font&gt;&lt;font size="2"&gt; i=0 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;to&lt;/font&gt;&lt;font size="2"&gt; uNode.length - 1&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Do&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;While&lt;/font&gt;&lt;font size="2"&gt; iNode.selectNodes(&amp;quot;my:UID&amp;quot;).length - 1 &amp;lt; i&lt;br /&gt;addDomElement iNode, &amp;quot;my:UID&amp;quot;, &amp;quot;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Loop&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;iNode.selectNodes(&amp;quot;my:UID&amp;quot;).item(i).Text = uNode.item(i).selectSingleNode(&amp;quot;my:UNetID&amp;quot;).Text&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Next&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;br /&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; addDomElement(objParentNode, strName, strValue)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Set&lt;/font&gt;&lt;font size="2"&gt; objNode = XDocument.Dom.createElement(strName)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;font size="2"&gt; strValue &amp;lt;&amp;gt; &amp;quot;&amp;quot; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/font&gt;&lt;font size="2"&gt; objNode.Text = strValue&lt;br /&gt;objParentNode.appendChild objNode &amp;#39;Error occurs here&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31483.aspx</link><pubDate>Fri, 15 Aug 2008 11:22:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31483</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31483.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31483</wfw:commentRss><description>If you have InfoPath 2007, you can use VSTA &amp;amp; C# or Visual Basic. You&amp;#39;ll probably find it much easier with the Intellisense and debugging options available there--I know I have!</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31482.aspx</link><pubDate>Fri, 15 Aug 2008 09:36:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31482</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31482.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31482</wfw:commentRss><description>&lt;p&gt;Thanks Hilary, that worked a treat. I thought I had tried that but I must have missed childNodes off the end! Programming with XML is proving trickier than I thought!&lt;/p&gt;</description></item><item><title>Re: Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31471.aspx</link><pubDate>Thu, 14 Aug 2008 19:25:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31471</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31471.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31471</wfw:commentRss><description>&lt;p&gt;Hi, Ben:&lt;/p&gt;
&lt;p&gt;Okay, your &amp;quot;my:Order&amp;quot; group -- is that a repeating group? When you say selectNodes, you can use that to bring back all instances of that group. So you are looping through all the instances of that group and popping up a message with the group&amp;#39;s name (thus the single dialog box with &amp;quot;my:Order&amp;quot;). Before you change your code, just for fun, preview your form and add another row or section to the repeating section or table bound to &amp;quot;my:Order&amp;quot; (if, indeed, that is your repeating group) and click your button (or whatever you have attached to your code) and you&amp;#39;ll get to see the alert twice!&lt;/p&gt;
&lt;p&gt;Now, to loop through the children of &amp;quot;my:Order&amp;quot;, you could do something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Set oNode = XDocument.Dom.selectNodes (&amp;quot;/my:myFields/my:topGroup/my:repeatingGroup&amp;quot;) &lt;br /&gt;For Each cNode In oNode &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each child In cNode.childNodes &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.UI.Alert child.nodeName &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next &lt;br /&gt;Next&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;First we are looping through all the &amp;quot;my:Order&amp;quot; nodes. We get all the children for the &amp;quot;my:Order&amp;quot; node we are currently looking at in our inner loop, then we go get another &amp;quot;my:Order&amp;quot; node.....&lt;/p&gt;</description></item><item><title>Navigating child nodes</title><link>https://www.infopathdev.com:443/forums/thread/31436.aspx</link><pubDate>Wed, 13 Aug 2008 15:40:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31436</guid><dc:creator>ben.oates</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31436.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31436</wfw:commentRss><description>&lt;p&gt;Hi all...&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to follow the instructions at this web site: &lt;a href="http://www.devguru.com/Technologies/xmldom/quickref/node_childNodes.html"&gt;http://www.devguru.com/Technologies/xmldom/quickref/node_childNodes.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am writing a supposedly simple piece of code but I&amp;#39;m really struggling to get it right. It&amp;#39;s probably some simple mistake I am making so I thought I would post it here.&lt;/p&gt;
&lt;p&gt;The code:&lt;/p&gt;
&lt;p&gt;Set oNode = XDocument.Dom.selectNodes (&amp;quot;/my:myFields/my:Order&amp;quot;)&lt;br /&gt;For Each cNode In oNode&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.UI.Alert cNode.nodeName&lt;br /&gt;Next&lt;/p&gt;
&lt;p&gt;This just brings up one alert saying &amp;quot;my:Order&amp;quot; and that&amp;#39;s it!&lt;/p&gt;
&lt;p&gt;If I try to put .childNodes anywhere it tells me that the &amp;quot;Object doesn&amp;#39;t support this property or method&amp;quot; and I should be iterating through the children (repeating elements SWID, HWID and UID and some non-repeating elements).&lt;/p&gt;
&lt;p&gt;Can anyone see where I am making my mistake, please?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Ben&lt;/p&gt;</description></item></channel></rss>