XML IMPORT

manthonylugo
Member Posts: 46
Hi Reader,
Can this be imported in NAV using XMLPORT?

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!
Can this be imported in NAV using XMLPORT?

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!
0
Best Answers
-
manthonylugo wrote: »Is it possible to use a line break for a separator in DATAPORT?
It seems to be pretty easy to parse. I personally wouldn't use a dataport to parse such a structure, but you can if you wish. Just create a dataport with two global vars as a column source, and a "=" character as a field separator and in OnAfterImportRecord() put a code to fill fields in your record and store it when all required fields are populated.Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035 -
If I remember you are not allowed to run XML Port objects from Classic Client - only via RTC. Better check this out before building your xml import.
In my opinion using a dataport would be your best option.
Using xml port it would be like this: https://pastebin.com/VC5MzeWW - The properties are pretty much will be the same for dataports.5
Answers
-
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-032 -
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?0 -
manthonylugo wrote: »Is it possible to use a line break for a separator in DATAPORT?
It seems to be pretty easy to parse. I personally wouldn't use a dataport to parse such a structure, but you can if you wish. Just create a dataport with two global vars as a column source, and a "=" character as a field separator and in OnAfterImportRecord() put a code to fill fields in your record and store it when all required fields are populated.Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035 -
If I remember you are not allowed to run XML Port objects from Classic Client - only via RTC. Better check this out before building your xml import.
In my opinion using a dataport would be your best option.
Using xml port it would be like this: https://pastebin.com/VC5MzeWW - The properties are pretty much will be the same for dataports.5 -
Thanks for the reply guys, this is already resolved guys
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions