Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Read XML Nodes in AX2012 R3

Posted on by 742

Hi Everyone,

I want to read data from below XML of highlighted attributes,

<?xml version="1.0" encoding="utf-8"?>
<ParentNode>
<Controls xmlns="Controls">
<Control controlType="label" name="Put" label="Purchase orders : Put" newLine="1" data="" type="Undefined" length="-1" error="0" defaultButton="0" enabled="1" selected="" color="#000000" xmlns="" />
<Control controlType="text" name="WMSLocationId" label="Loc" newLine="1" data="TEMP2" type="String" length="10" error="0" defaultButton="0" enabled="0" selected="" color="#000000" xmlns="" />
<Control controlType="text" name="LicensePlateId" label="LP" newLine="1" data="000301301-0000006433" type="String" length="25" error="0" defaultButton="0" enabled="0" selected="" color="#000000" xmlns="" />
<Control controlType="text" name="ItemId" label="Item" newLine="1" data="DORSGL" type="String" length="20" error="0" defaultButton="0" enabled="0" selected="" color="#000000" xmlns="" />
</Controls>
<Auth userId="hkarmakar" sessionId="{5D316978-427B-4323-991D-85345E74FC9A}" />
<UserCulture>EN-US</UserCulture>
</ParentNode>

Please find attached screenshot of my code.

What should I write in for Loop so that I can retrieve the values of Attributes.

readXML.png

  • Suggested answer
    Ajit Profile Picture
    Ajit 8,755 on at
    RE: Read XML Nodes in AX2012 R3

    I think this is something you can configure OOB what Andre has suggested but if you still want to do through code I guess you can get by comparing the nodes.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: Read XML Nodes in AX2012 R3

    Hi Rhushikesh,

    Why aren't you using the Data Import Export Framework or AIF to read your XML with purchase order information? You are now creating a customization for something that can be configured out of the box.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans