Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Issue Importing XML file

Posted on by 2,266

Hi folks,
I have developed a XMLport and trying to import a file having data like:

<tlp:Invoices xmlns:tlp="www.timelog.com/.../v4_4">

<tlp:Invoice ID="11234">

<tlp:InvoiceNumber>6525</tlp:InvoiceNumber>
<tlp:Header>Abcd efg</tlp:Header>
<tlp:Text />
<tlp:InvoiceDate>2017-08-31T00:00:00</tlp:InvoiceDate>
<tlp:DueDate>2017-09-30T00:00:00</tlp:DueDate>
<tlp:Amount>123654.1900</tlp:Amount>
<tlp:Status>2</tlp:Status>
<tlp:Type>0</tlp:Type>

</tlp:Invoice>

</tlp:Invoices>

When i run the XML port it generates the following error:
Schema generation and node names that contains colons (:) are not supported (node tlp:type)
7750.Capture.PNG

The xml code is as follow:

XMLPort-Structure.JPG

Looking forward to your suggestions. Thanks

*This post is locked for comments

  • GermanNavNETdev Profile Picture
    GermanNavNETdev 45 on at
    RE: Issue Importing XML file

    Possible variants:

    - Don't use tld: inside the xml port. You don't need it -> take a look at the xsd api.timelog.com/.../TimeLogTLPWebAppCodeServiceGetInvoiceLineDetailsRaw

    - Try the NAV Xmlport Generator mibuso.com/.../dynamics-nav-xmlport-generator-v1.3 or community.dynamics.com/.../xmlport-generator

    - Code the import by code with dotnet type. google search "dynamics nav 2017 dotnet xml"

    www.prostrategy.ie/using-dotnet-data-type-to-work-with-xml-sources-in-dynamics-nav

    Regards, Dominik Oswald

    Twitter: @DominikMMOz

    Please verify my answer, if you find it helpful. Doing so you'll show others that there was found a solution and you credit my help.

  • Zaid Tariq Profile Picture
    Zaid Tariq 2,266 on at
    RE: Issue Importing XML file

    Yah the issue is with this ":" character but I posted to confirm that there is no other solution except doing pre-processing xml file. I guess, as you suggested i need to do in that way. Thanks for the help

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Issue Importing XML file

    Zaid, As error is stating you cannot have node names with :, either you can process that xml file before sending it to XMLport to remove the tlp: and then design the XMLport to have InvoiceID, InvoiceNumber....

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans