Append Empty Node - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Append Empty Node

Last post 10-26-2009 05:05 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-23-2009 01:53 PM

    Append Empty Node

    How do you append an empty node to a data object in jscript?

     

     

    Filed under:
  • 10-26-2009 05:05 AM In reply to

     This will do the trick:

    var group1 = XDocument.DOM.selectSingleNode("/my:myFields/my:group1");
    var group2 = XDocument.DOM.createNode("element", "my:group2", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-10-26T11:56:24");
    group1.appendChild(group2); 

    You'll of course need to replace the path, node name, and namespace URI with your own.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.