web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

AL Error in XPATH Query, while fetching XML nodes from an API Response (The XPath Query Does not Match any nodes)

(0) ShareShare
ReportReport
Posted on by 2,320 Moderator

Dear Experts -

I am trying to read an XML API Response and am close. However, I am unable to understand/comprehend an XPATH Query for fetching details of what is written in "<ErrorMessage>" node. I am able to read the Status and StatusMessage nodes successfully. Probably I need to create another ForLoop? If yes, how?

Please assist me in figuring out the XPath for locating <ErrorMessage>

Pasted is the XML API Response and below is the AL code which I have tried writing, but every time it returns an error

5554.png

70150.png

2046.png

8311.png

ajkauffmann 

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,794 Moderator on at

    Hi,

    Please refer the below link, might be it help you.

    andreilungu.com/.../

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,165 Moderator on at

    Your xpath declarations does not look correct.

    try //ErrorMessage as your xpath.

  • NAV_with_Narang Profile Picture
    2,320 Moderator on at

    Thankyou, yes the XML Buffer approach was straightforward than nitpicking nodes. However, my code is pasted for reference below

    All it takes to insert data into XMLBuffer table is calling the function.

    pastedimage1673014890928v1.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,005 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans