<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: XmlNode from code to datasource</title><link>https://www.infopathdev.com:443/forums/thread/10840.aspx</link><pubDate>Fri, 29 Dec 2006 12:33:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10840</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10840.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10840</wfw:commentRss><description>Now if you want to represent the data in a smarter view hide the repeating section, put a dropdownlist control to your view and bind it to the textboxcontrol within your repeating section.</description></item><item><title>Re: XmlNode from code to datasource</title><link>https://www.infopathdev.com:443/forums/thread/10839.aspx</link><pubDate>Fri, 29 Dec 2006 12:29:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10839</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10839.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10839</wfw:commentRss><description>Not to sure if I understand you correct but....&lt;br /&gt;&lt;br /&gt;so the FOO tags in you xmlNode object are repeating.&lt;br /&gt;What you then can do is to first count how many of these tags you have. Then put a repeating section in your infopath view and put a textbox control into this repeating section.&lt;br /&gt;&lt;br /&gt;No you need to create as many repeating sections as you counted tags in your xml string, this you can do with the following code:&lt;br /&gt;&lt;br /&gt;int requiredsections = XmlNodeObject.SelectNodes("your xPathString").length&lt;br /&gt;&lt;br /&gt;Now you can just hide the complete repeating sections, put a dropdownlist to your view and bind it to the textboxcontrol within your hidden section.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;for(int i = 1; i &amp;lt; requiredSections; i++)&lt;br /&gt;{&lt;br /&gt;string myRepeat	= thisXDocument.DOM.selectSingleNode("my:myFields/my:group1/my:group2").xml;&lt;br /&gt;IXMLDOMDocument oXml = thisXDocument.CreateDOM();&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.loadXML(myRepeat);&lt;br /&gt;IXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode("my:myFields/my:group1");&lt;br /&gt;parentNode.appendChild(oXml.documentElement);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Like this you have as many repeating sections as needed including the textbox controls&lt;br /&gt;&lt;br /&gt;now just fill the textbox controls&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;br /&gt;for(int j = 1; j &amp;lt; requiredSections; j++)&lt;br /&gt;{&lt;br /&gt; thisXDocument.DOM.selectSingleNode("my:myFields/my:group1/my:group2[" + j + "]/field1").text = XmlNodeObject.selectSingleNode(yourXPathString).InnerText;&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;If you now want to represent these data in a better way just hide the complete repeating sections from the view, enter a dropdownlist to your view and bind it to the textbox control within your repeating section, like this you have all values in the ddl.&lt;br /&gt;&lt;br /&gt;Does this help ?</description></item><item><title>Re: XmlNode from code to datasource</title><link>https://www.infopathdev.com:443/forums/thread/10838.aspx</link><pubDate>Fri, 29 Dec 2006 11:58:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10838</guid><dc:creator>ekzarov</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10838.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10838</wfw:commentRss><description>Thanks, but I need put this data in list... Can I do this?</description></item><item><title>Re: XmlNode from code to datasource</title><link>https://www.infopathdev.com:443/forums/thread/10837.aspx</link><pubDate>Fri, 29 Dec 2006 11:27:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10837</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10837.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10837</wfw:commentRss><description>Hi ekzarov,&lt;br /&gt;&lt;br /&gt;you can try this: Put a textbox control to your infopath view (if it is the first one the name will be field1)&lt;br /&gt;&lt;br /&gt;Now in VS (code) do the following&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;string strXml = yourXmlNodeObject.xml&lt;br /&gt;XmlDocument myXMLDoc = new XmlDocument();&lt;br /&gt;myXMLDoc.LoadXml(strXml);&lt;br /&gt;&lt;br /&gt;//create new xml dom node (reference to your textboxcontrol)&lt;br /&gt;IXMLDOMNode myTextBoxControl = thisXDocument.Dom.selectSingleNode("my:myFields/my:field1")&lt;br /&gt;//fill text box (node)&lt;br /&gt;myTextBoxControl.text = myXmlDoc.SelectSingleNode("xPath to the node you want the value of").InnerText;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Does it help ?</description></item><item><title>XmlNode from code to datasource</title><link>https://www.infopathdev.com:443/forums/thread/5988.aspx</link><pubDate>Fri, 29 Dec 2006 10:16:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5988</guid><dc:creator>ekzarov</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5988.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5988</wfw:commentRss><description>If I in my C# code recieve this XmlNode object with InnerXml:&lt;br /&gt;  &amp;lt;rs:data ItemCount="2" xmlns:rs="urn:schemas-microsoft-com:rowset"&amp;gt;&lt;br /&gt;  &amp;lt;z:row Foo="FooValue1" /&amp;gt;&lt;br /&gt;  &amp;lt;z:row Foo="FooValue2" /&amp;gt;&lt;br /&gt;  &amp;lt;/rs:data&amp;gt;&lt;br /&gt;How can I see it in my Form. Should I create some repeating table? How can I set this XmlNode to some Datasource in my form?</description></item></channel></rss>