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..
Is it possible to use a line break for a separator in DATAPORT?
No, I don't think so, but, frankly speaking, haven't tried it myslef.
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.
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.
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>
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?
Is it possible to use a line break for a separator in DATAPORT?
No, I don't think so, but, frankly speaking, haven't tried it myslef.
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.
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.
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!
Answers
If you want to use XML port you need to convert the file into valid XML, could be like this for example:
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
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?
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.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
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.
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.