Use XMLPort to import flat file?

ccbryan63
Member Posts: 115
What I've seen indicates that XMLports can be configured to work like dataports. I assume that you set the Format property to variable. But I'm getting
"The XML Parser return the following fatal error: Incorrect documnet syntax. Line Number = 1 Column No. = 1"
Here's what my text file looks like:
"PAYROLL","10000","11",11/30/2010,"Payment","Regular.....
"PAYROLL","20000","139",11/30/2010,"Payment","Regular....
"PAYROLL","30000","14",11/30/2010,"Payment","Regular....
My XMLport Designer looks like this:
I have set the properties to
Direction = Import
Format = Variable Text
Field delimiter = <:>
Field Separator = <,>
Is there a brief answer to "What am I doing wrong?"
Thanks...
"The XML Parser return the following fatal error: Incorrect documnet syntax. Line Number = 1 Column No. = 1"
Here's what my text file looks like:
"PAYROLL","10000","11",11/30/2010,"Payment","Regular.....
"PAYROLL","20000","139",11/30/2010,"Payment","Regular....
"PAYROLL","30000","14",11/30/2010,"Payment","Regular....
My XMLport Designer looks like this:
Node Name Node Type Source Type Data Source ------------ ----------- ----------- ----------- Root Element Text <Root> Payroll Journal Line Element Table <Payroll Journal Line>(Payroll Jouirnal Line) JournalTemplateName Element Field <Payroll Journal Line>:: Journal template Name LineNo Element Field <Payroll Journal Line>:: Line No. ......
I have set the properties to
Direction = Import
Format = Variable Text
Field delimiter = <:>
Field Separator = <,>
Is there a brief answer to "What am I doing wrong?"
Thanks...
0
Comments
-
Field delimiter = <:>
looks like quotes to me "
why isn't the date field surrounded by "'s0 -
From what I understand, the XMLport will only act like a dataport if you run it in the RTC environment. In another words, no classic client or NAS.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
D'oh, that was a typo in my question. Field Delimiter is (and has been) <">.
I'm kind of expecting an error on the date field actually, but not on Line 1 column 1??
I am intending this XMLport to run on the RTC, but it has to be designed on the Classic side, no?
I have also seen it bandied about that dataports can be run on the RTC if you stick them in a process-only report (dataport.runmodal(50000)) but I get "RUNMODAL" (and RUN for that matter) are obsolete".0 -
Nope, not true. You cannot run dataports in RTC. Only XMLports.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
OK, I more or less got it solved. The main problem was apparently that I was trying to run the XMLPort to import a flat file from Classic instead of from the RTC.
However, I still need to do some manipulation of the data, evaluating incoming values. And I am still getting a compile error in the XMLport whenever i try to refer to the node name (DocumentType) or the field name ("Document Type"). Either way, I get a 'variable not recognized error', even in the trigger named DocumentType. What am I missing??0 -
Hi,
I have same error as above.
I m trying to import Flat File with XMLPort.
I wrote a Codeunit with SingleInstance and call the XMLPort Import. I have setup NAS to run the Codeunit from Codeunit 1.
IF i link the Codeunit into RTC and click on the Codeunit from RTC, It seem the flat file successfull import via XMLport Import but when i switch it to NAS I have this error
"The XML Parser return the following fatal error: Incorrect documnet syntax. Line Number = 1 Column No. = 1"
Have anyone have this issue with XMLPort Import flat file via NAS?
Thank you0 -
I don't think you will be able to run an XMLPORT with the Format property set to Variable or Fixed Text from NAS. I tried something similar a couple months ago and found that NAS does not recognize the Format property. It treats all XMLPORTS as Format=XML.Joseph Gress0
-
Hi JosephGress,
Finally i just used report to import text file and run nas to import. I m suspecting the same that the NAS ignored the Text file and expecting XML format .
Thanks for feedback0
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