Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

[AL] Xml variables methods problem

Posted on by 217

Hi,

I'm actualy working on a project to convert from CAL to AL (in order to deploy to Business Central). There is a lot of DotNet variables in it, especially xml variables. So I use some methods given by MS ( https://docs.microsoft.com/fr-fr/dynamics365/business-central/dev-itpro/developer/devenv-restapi-overview ), but I'm in struggle with this kind of lines:

XmlAttributes.GetNamedItem(Text)

XmlDocument.GetElementsByTagName(Text)

XmlElementField.HasChildNodes()

-> Can't find a way to do this in AL.

Is someone has already hit this kind of problem and has a way to solve it ?

Thanks !

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: [AL] Xml variables methods problem

    You're right, there's actually no a direct implementation of these methods.

    I think you can use others, like XmlAttributeCollection Class or XmlDocument.GetChildElements() or XmlElement.GetChildNodes() to obtain the same result.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans