Hi all,
Currently i handling 1 integration project(NAVISION & Kodak Insite) which need XML import/export in automation to exchange data each other. Where can i start for this in Navision assume Kodak Insite have generated 1 XML file in 1 of the location, so how can our NAVISION pick up this file & import to system automatically?
Is anyone familiar on this? Please help. Thanks.
Hi,
You can use XMLPORT for importing data by setting property Format/Evaluate to XML Format/Evaluate. For picking up the file from particular location/folder you need to schedule the XMLPORT by using schedular
Hi Amol,
thanks a lot for your replied. in XMLport, I already create an new object which consist all element/attribute to be import. I did research from other source, could below code apply to my case? If yes, the code where should i put in? Codeunit?
XMLFile.TEXTMODE(FALSE);
XMLFile.OPEN(SavePath);
XMLFile.CREATEINSTREAM(InStream);
InputText.READ(InStream);
XMLFile.CLOSE;
TextToFind := 'xmlns=""';
TextPos := InputText.TEXTPOS(TextToFind);
WHILE TextPos <> 0 DO BEGIN
InputText.GETSUBTEXT(SubText, 1, TextPos - 1);
OutputText.ADDTEXT(SubText);
InputText.GETSUBTEXT(InputText, TextPos + STRLEN(TextToFind));
TextPos := InputText.TEXTPOS(TextToFind);
END;
OutputText.ADDTEXT(InputText);
XMLFile.TEXTMODE(FALSE);
XMLFile.CREATE(SavePath);
XMLFile.CREATEOUTSTREAM(OutStream);
OutputText.WRITE(OutStream);
XMLFile.CLOSE;