XML IMPORT

Hi Reader,

Can this be imported in NAV using XMLPORT?

vieiouo3p1rj.jpg

If it's possible may I know how would I create an XML with this kind of structure. Because I tried doing it but am having a hard time reading it with my XMLPORT.
Hope you could help me..

Your answer will be much appreciated. :)
Thanks!

Best Answers

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2017-12-12
    In Classic Client text files, files like the one on the screenshot above, can be handled by a dataport. Or you can write a bit of code reading the file line by line and interpreting its content.

    If you want to use XML port you need to convert the file into valid XML, could be like this for example:
    <root>
      <LAB>74...</LAB>
      <DO>B</DO>
      <ACCN>813...</ACCN>
      <JOB>S017..</JOB>
      <!--... and so on -->
    </root>
    
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • manthonylugomanthonylugo Member Posts: 46
    edited 2017-12-12
    Hi Slawek, thanks for the reply!

    Actually that's what am telling them, they were insisting that it is an XML file and they are using that kind of file ever since with their existing client so we have no choice but to follow them. :(
    The only thing that comes in my mind that can handle it is the XMLPORT but it looks like its a dead-end also :'(

    Is it possible to use a line break for a separator in DATAPORT?
  • manthonylugomanthonylugo Member Posts: 46
    Thanks for the reply guys, this is already resolved guys :wink:
    What I did was quite simple. Just parsed it line by line. Thanks for all the advice it helps me a lot thanks!

    Sorry it took me a while to closed the thread.
Sign In or Register to comment.