<?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: Create Node with multiple fields</title><link>https://www.infopathdev.com:443/forums/thread/6793.aspx</link><pubDate>Mon, 09 May 2005 18:45:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6793</guid><dc:creator>Hawouax</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6793.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6793</wfw:commentRss><description>Thank you very much Agni,&lt;br /&gt;&lt;br /&gt;  I finally got it.&lt;br /&gt;&lt;br /&gt;Thanks for your help.</description></item><item><title>Re: Create Node with multiple fields</title><link>https://www.infopathdev.com:443/forums/thread/6792.aspx</link><pubDate>Fri, 06 May 2005 04:28:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6792</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6792.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6792</wfw:commentRss><description>Hi Christian,&lt;br /&gt;You made small mistake here, in my sample I replaced whole of "d:tbl_attendees" node with the new node. But you are appending the new "d:tbl_attendees" node to the old "d:tbl_attendees" node which is wrong according to the schema. &lt;br /&gt;&lt;br /&gt;In my sample we have prepared a new "d:tbl_attendees" node to replace the existing node.  &lt;br /&gt;&lt;br /&gt;xmlParent.ParentNode.ReplaceChild(oXml.documentElement, xmlParent)&lt;br /&gt;&lt;br /&gt;Hope you got it!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Re: Create Node with multiple fields</title><link>https://www.infopathdev.com:443/forums/thread/6791.aspx</link><pubDate>Thu, 05 May 2005 20:14:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6791</guid><dc:creator>Hawouax</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6791.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6791</wfw:commentRss><description>Hi Agni,&lt;br /&gt;&lt;br /&gt;  Here is the code I modified but I still got the error :   &lt;br /&gt;    Element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}&gt;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}&lt;/a&gt;&lt;br /&gt;    tbl_attendees' is unexpected according to content model of parent &lt;br /&gt;    element '&lt;a target="_blank" href=http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}&gt;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}&lt;/a&gt;&lt;br /&gt;    tbl_attendees'.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;	var sRepeatingNode = "&amp;lt;d:tbl_attendees xmlns:d='http://schemas.microsoft.com/office/infopath/2003/ado/dataFields'&amp;gt;&amp;lt;ID&amp;gt;1&amp;lt;/ID&amp;gt;&amp;lt;Id_attendee&amp;gt;1&amp;lt;/Id_attendee&amp;gt;&amp;lt;Attendee_name&amp;gt;Christian Côté&amp;lt;/Attendee_name&amp;gt;&amp;lt;Attendee_status&amp;gt;1&amp;lt;/Attendee_status&amp;gt;&amp;lt;/d:tbl_attendees&amp;gt;";&lt;br /&gt;&lt;br /&gt;	var xmlParent = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tbl_info/d:tbl_attendees");&lt;br /&gt;&lt;br /&gt;	var oXml = XDocument.CreateDOM();&lt;br /&gt;	oXml.async = false;&lt;br /&gt;	oXml.loadXML(sRepeatingNode);&lt;br /&gt;	xmlParent.appendChild(oXml.documentElement);&lt;br /&gt;&lt;br /&gt;  Do you have an idea why it's happening ???&lt;br /&gt;&lt;br /&gt;Thanks a million&lt;br /&gt;&lt;br /&gt;Christian&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Create Node with multiple fields</title><link>https://www.infopathdev.com:443/forums/thread/6790.aspx</link><pubDate>Thu, 05 May 2005 03:53:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6790</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6790.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6790</wfw:commentRss><description>Hi Christian Côté, Welcome to the Board!&lt;br /&gt;You are almost near to getting it done, &lt;br /&gt;Instead of creating each node individually you can create a DOM of "d:tbl_attendees" and replace the original "d:tbl_attendees" with the new one.&lt;br /&gt;Here is how you do it &lt;br /&gt;var sXml = "&amp;lt;d:tbl_attendees xmlns:d='http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' &amp;gt; &lt;br /&gt;         &amp;lt;Attendee_name&amp;gt;Christian&amp;lt;/Attendee_name&amp;gt;&lt;br /&gt;         &amp;lt;Attendee_Number&amp;gt;Number&amp;lt;/Attendee_Number&amp;gt;&lt;br /&gt;&amp;lt;/d:tbl_attendees&amp;gt;"&lt;br /&gt;&lt;br /&gt;Load this into a Dom &lt;br /&gt;var oXml = XDocument.CreateDOM();&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.loadXML(sXml);&lt;br /&gt;Now replace your old "d:tbl_attendees" with the new one.&lt;br /&gt;xmlParent.ParentNode.ReplaceChild(oXml.documentElement, xmlParent)&lt;br /&gt;&lt;br /&gt;Hope this Helps!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Create Node with multiple fields</title><link>https://www.infopathdev.com:443/forums/thread/4649.aspx</link><pubDate>Wed, 04 May 2005 14:09:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4649</guid><dc:creator>Hawouax</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4649.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4649</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;  I'm programming with InfoPath since 1 week and I have some problems to create node manually with JScript.&lt;br /&gt;&lt;br /&gt;  Here is my structure :&lt;br /&gt;&lt;br /&gt;  + tbl_info (repeating)&lt;br /&gt;    ...&lt;br /&gt;    + tbl_attendees (repeating)&lt;br /&gt;      - ID&lt;br /&gt;      - Id_Attendee&lt;br /&gt;      - Attendee_name&lt;br /&gt;      - Attendee_status&lt;br /&gt;&lt;br /&gt;  When tbl_attendees have only 1 field i'm able to create a new node by using the following code : &lt;br /&gt;&lt;br /&gt;    + tbl_attendees (repeating)&lt;br /&gt;      - Attendee_name&lt;br /&gt;&lt;br /&gt;  var xmlNodeText = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tbl_info/d:tbl_attendees/@Attendee_name");&lt;br /&gt;  var xmlParent = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tbl_info/d:tbl_attendees");&lt;br /&gt;  var newNode;&lt;br /&gt;&lt;br /&gt;  newNode = XDocument.DOM.createNode &lt;br /&gt;  (1, "Attendee_name", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-04&lt;br /&gt;  -01T18:40:51");&lt;br /&gt;  newNode.text = "Christian";&lt;br /&gt;  xmlParent.appendChild(newNode);&lt;br /&gt;&lt;br /&gt;How can I do the same things with few fields in tbl_attendees ???&lt;br /&gt;&lt;br /&gt;Thanks a lot &lt;br /&gt;&lt;br /&gt;Christian Côté&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>