Help needed in designing xml port

How to design the xml port for this xml file
<response>
    <id>2</id>
    <parent_id>1</parent_id>
    <name>Default Category</name>
    <is_active>true</is_active>
    <position>1</position>
    <level>1</level>
    <product_count>0</product_count>
    <children_data>
        <item>
            <id>4</id>
            <parent_id>2</parent_id>
            <name>Electronics</name>
            <is_active>true</is_active>
            <position>2</position>
            <level>2</level>
            <product_count>0</product_count>
            <children_data>
                <item>
                    <id>5</id>
                    <parent_id>4</parent_id>
                    <name>Phones &amp;amp; Tablets</name>
                    <is_active>true</is_active>
                    <position>1</position>
                    <level>3</level>
                    <product_count>0</product_count>
                    <children_data>
                        <item>
                            <id>6</id>
                            <parent_id>5</parent_id>
                            <name>Smart Phones</name>
                            <is_active>true</is_active>
                            <position>1</position>
                            <level>4</level>
                            <product_count>3</product_count>
                            <children_data>
                                <item>
                                    <id>7</id>
                                    <parent_id>6</parent_id>
                                    <name>Apple</name>
                                    <is_active>true</is_active>
                                    <position>1</position>
                                    <level>5</level>
                                    <product_count>0</product_count>
                                    <children_data/>
                                </item>
                                <item>
                                    <id>8</id>
                                    <parent_id>6</parent_id>
                                    <name>Huawei</name>
                                    <is_active>true</is_active>
                                    <position>2</position>
                                    <level>5</level>
                                    <product_count>0</product_count>
                                    <children_data/>
                                </item>
                                <item>
                                    <id>9</id>
                                    <parent_id>6</parent_id>
                                    <name> Microsoft</name>
                                    <is_active>true</is_active>
                                    <position>3</position>
                                    <level>5</level>
                                    <product_count>0</product_count>
                                    <children_data/>
                                </item>
                                <item>
                                    <id>10</id>
                                    <parent_id>6</parent_id>
                                    <name>Mi</name>
                                    <is_active>true</is_active>
                                    <position>4</position>
                                    <level>5</level>
                                    <product_count>0</product_count>
                                    <children_data/>
                                </item>
                            </children_data>
                        </item>
                    </children_data>
                </item>
            </children_data>
        </item>
    </children_data>
</response>

I have tired but failed.

Please help.
Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.

please like / agree / verify my answer, if it was helpful for you. thanks.

Answers

  • RockWithNAVRockWithNAV Member Posts: 1,139
    And whats new in this??

    Design XML with same name, indentation and attributes as you have shown above

    Are you facing any specific issue??
  • zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    And whats new in this??

    Design XML with same name, indentation and attributes as you have shown above

    Are you facing any specific issue??

    I am facing issue in designing like the herarchy is same to be different on every level? Can you show some basic by designing it? like upto 2 levels?

    Looking forward.
    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
  • HarikiranHarikiran Member Posts: 39
    Hi Zohaib,
    you can refer the existing xmlport 5050 "Export Contact". This can give you a very good knowledge on how to design xmlport in general.
    If you need to import, then you just need to change the properties of xmlport "Direction" to import.

    Hope this helps.
    Harikiran BM | ERP Specialist
  • zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    I know how to design xml port the issue is on every level child is indented to one more level so i am not able to understand how to design this?

    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
Sign In or Register to comment.