Hi,
I guess my import code works fine. When I import the same xml file once, twice or three times without reseting it just adds the contents to the form. But if I use the reset function, this next time I use the import function I get the error "selectSingleNode(..) Null or no object".
This is an example of my import code:
if (gdomImported.selectSingleNode("/NOTIF/NOTIF_PARTNER/item[PARVW_VTEXT/text()='Autor']/PARNR_NAM"))
{
objDataDOM.selectSingleNode("/my:ECx/my:BASIC_DATA/my:BD_INITIATOR").text = gdomImported.selectSingleNode("/NOTIF/NOTIF_PARTNER/item[PARVW_VTEXT/text()='Autor']/PARNR_NAM").text;
}
if(gdomImported.selectSingleNode("/NOTIF/NOTIF_TEXT/item[1]/TDLINE"))
{
objDataDOM.selectSingleNode("/my:ECx/my:BASIC_DATA/my:BD_REASON_CR").text = gdomImported.selectSingleNode("/NOTIF/NOTIF_TEXT/item[1]/TDLINE").text;
}
var parent = objDataDOM.selectSingleNode("/my:ECx/my:BASIC_DATA");
var firstRow = objDataDOM.selectSingleNode("/my:ECx/my:BASIC_DATA/my:BD_CHANGEDESC");
var i = 2;
while (gdomImported.selectSingleNode("/NOTIF/NOTIF_TEXT/item["+i+"]/TDLINE"))
{
var newRow = firstRow.cloneNode(true);
newRow.text = gdomImported.selectSingleNode("/NOTIF/NOTIF_TEXT/item["+i+"]/TDLINE").text;
parent.insertBefore(newRow, firstRow);
i++;
}This is mainly taken from the CD import example provided by Microsoft.
But if you have any hints on how to clear a form by script, I'd appreciate that very much.
Best regards,
buki