How to use Xmlport without file selection


i have a small issue with my xmlport. I’m trying to import a file to NAV, but it does not work. I’m getting error saying that “Element journal line was not expected”. I don’t know what the error means. Here is my xmlport:

root		Element	Text	<root>
GenJournalLine		Element	Table	<Gen. Journal Line>(Gen. Journal Line)

and here is my code from where i call the xmlport:

  CurrFile.OPEN(FileRec.Path + FileRec.Name);

Go to XML Port Property. Choose “Format → Xml”.

the fiile is not xml, it s a csv file.

Go to XML Port Property. Choose “Format -->Variable Text”.

Hi Lynix,
Did Siddhartha’s suggestion help you solve your problem?

Thank you, that helped me