Hi all,
my users search for products in a database, and I want to allow my user to clear the repeating table of search results. So I have a button with this code:
// now clear the query results table
objSource = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields" );
var allTheNodes = objSource.selectNodes("//d:Products");
for (var i=0; i<allTheNodes.length; i++) {
Item = allTheNodes.item(i);
objSource.removeChild(Item);
}
This works fine if my repeating table showing the products only has a couple of entries. Once the number of entries is huge (100+, I would say), INFOPATH.EXE consumes 50% CPU for minutes, and most of the time I have to kill the process since it never seems to return.
Is there a faster and mroe performant way to remove all child nodes ?
Cheers
moe