<?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: parentNode doesn't work!</title><link>https://www.infopathdev.com:443/forums/thread/13752.aspx</link><pubDate>Tue, 11 Oct 2005 17:27:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13752</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13752.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13752</wfw:commentRss><description>The eventObj.Site does NOT return the entire XML Document for the form.  For instance, if you drop this code into your OnBeforeChange event, review what will be returned.&lt;br /&gt;&lt;br /&gt;XDocument.UI.Alert(eventObj.Site.xml)&lt;br /&gt;&lt;br /&gt;It would return something like:&lt;br /&gt;&lt;br /&gt;&amp;lt;CHILD&amp;gt;&lt;br /&gt;&amp;lt;ID&amp;gt;1.1&amp;lt;/ID&amp;gt;&lt;br /&gt;&amp;lt;..&amp;gt;..&amp;lt;..&amp;gt;&lt;br /&gt;&amp;lt;/CHILD&amp;gt;&lt;br /&gt;&lt;br /&gt;The father will not be returned in eventObj.Site.  To get the father node for the child beind deleted, you will need to write an XPath statement against XDocument.DOM.selectSingleNode(...) to get the father.</description></item><item><title>Re: parentNode doesn't work!</title><link>https://www.infopathdev.com:443/forums/thread/13751.aspx</link><pubDate>Tue, 11 Oct 2005 07:24:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13751</guid><dc:creator>ilbruni</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13751.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13751</wfw:commentRss><description>I tried. But it gives me the same problem. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by franck&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;&lt;br /&gt;Have you tried to play with eventObj.Source rather than Site?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: parentNode doesn't work!</title><link>https://www.infopathdev.com:443/forums/thread/13750.aspx</link><pubDate>Mon, 10 Oct 2005 16:44:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13750</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13750.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13750</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Have you tried to play with eventObj.Source rather than Site?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Franck Dauché</description></item><item><title>parentNode doesn't work!</title><link>https://www.infopathdev.com:443/forums/thread/12611.aspx</link><pubDate>Mon, 10 Oct 2005 16:27:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12611</guid><dc:creator>ilbruni</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12611.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12611</wfw:commentRss><description>Hi everybody.&lt;br /&gt;I'm a new entry in this forum that has been very helpful for me learning infopath.&lt;br /&gt;I hope that someone could help me with a problem that I can't solve.&lt;br /&gt;&lt;br /&gt;I have an xml structured in this way:&lt;br /&gt;&lt;br /&gt;&amp;lt;FATHER&amp;gt;&lt;br /&gt;  &amp;lt;ID&amp;gt;1&amp;lt;/ID&amp;gt;&lt;br /&gt;  &amp;lt;..&amp;gt;..&amp;lt;/..&amp;gt;&lt;br /&gt;  &amp;lt;CHILD&amp;gt;&lt;br /&gt;     &amp;lt;ID&amp;gt;1.1&amp;lt;/ID&amp;gt;&lt;br /&gt;     &amp;lt;..&amp;gt;..&amp;lt;..&amp;gt;&lt;br /&gt;  &amp;lt;/CHILD&amp;gt;&lt;br /&gt;&amp;lt;/FATHER&amp;gt;&lt;br /&gt;&lt;br /&gt;I have a repeating section for the child where I can add/erese elements.&lt;br /&gt;When I delete a child section I need to know the ID of the father  to change the value of another TAG. &lt;br /&gt;&lt;br /&gt;In the event Child::OnBeforeChange I wrote a code like this&lt;br /&gt;&lt;br /&gt;&lt;i&gt;XDocument.UI.Alert(eventObj.Site.parentNode.selectSingleNode("ID").value;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;&lt;i&gt;XDocument.UI.Alert(eventObj.Site.selectSingleNode("../ID").value;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The problem is that both work when I insert or I update a child element but not when I delete. In this case It gives me an error like "Object needed".&lt;br /&gt;&lt;br /&gt;The strange thing is that during delete I can just access to the child elements(for example eventObj.Site.selectSingleNode("ID") but not to the father.&lt;br /&gt;&lt;br /&gt;Anybody can help me???&lt;br /&gt;Thanks a lot.&lt;br /&gt;&lt;br /&gt;Matteo.&lt;br /&gt;PS: sorry for my english! :-)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>