xml port problem with node called Report

nightrodnightrod Member Posts: 68
Hi all,

i got a xml file i want to import. the problem is that the first node of the xml file is called "Report".
So when i enter the node name in the xml port it doesnt compile with the following error:

the variable report is defined more than once.

Report is a system variable (or how do you call it) so i can not that name.
When i give it another name the report doesnt run saying the element Report is not found.
Is there a trick to fix this.
i can't change the xml file because it comes from a third party software.

Thanks for help.

Comments

  • ara3nara3n Member Posts: 9,256
    You need to change the source expression to a different name.
    By default nav sets the text to the same name as xml tag, but you can change that.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • mandykmandyk Member Posts: 57
    Hi nightrod,

    May be using automation of Microsoft XML, v3.0 could help you on this issue.
    They are many examples of C/AL codes using automation above in Navision standard code unit.
    you can start with code unit 6813 "EP Decode XML" which show you how accessing the XML nodes and extract the values.
  • nightrodnightrod Member Posts: 68
    Hi Rashed,
    Your solution fixed it.
    Thanks a lot.
Sign In or Register to comment.