Generate XML File

I want to export xml file from Navision 2009.
I want to have this structure,
If I have table A with field X (data x1,x2,x3) and field Y (data y1,y2,y3).
xml file will be:
<x1> y1 < /x1>
<x2> y2 < /x2>
<x3> y3 < /x3>
is it possible with xml ports?
or I must use another solution?
thank you

Answers

  • zaidtariq
    zaidtariq Member Posts: 52
    So XML root tag will be added at the start, so you need to do the customization
    Best Regards:
    Zaid Tariq
    Dynamics NAV/365 BC Developer at Dynamics 360

    please like / agree / verify my answer, if was helpful.
  • Wided
    Wided Member Posts: 4
    Thank you for your quick reply, but I'm new with Nav, Can you explain more please?
    how can I do the customization?
  • vaprog
    vaprog Member Posts: 1,163
    Firsts, any wellformed XML document needs exactly one root element!

    Then, what do you want to do? Do you want to number the elements in its name?

    Can you come up with a DTD or schema for this?

    If this is, what you want to do, then no: XMLPorts (used with property Format=XML) are meant for generating proper XML files, which stand a chance of being valid.

    You my be able to do it using an XMLPort with Format=Variable Text.
  • Wided
    Wided Member Posts: 4
    Yes, I have xsd files that control the structure of the xml files.
    I want this form:
    <root>
    <x1> y1 < /x1>
    <x2> y2 < /x2>
    <x3> y3 < /x3>
    </root>
    I will change the Format to Variable Text and retry, Thank You
  • zaidtariq
    zaidtariq Member Posts: 52
    @Wided let me know if you still face issue.
    Best Regards:
    Zaid Tariq
    Dynamics NAV/365 BC Developer at Dynamics 360

    please like / agree / verify my answer, if was helpful.
  • Wided
    Wided Member Posts: 4
    @zaidtariq thank you , I will inform you in case of problems.