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

Read an XML content saved in a BLOB Field in Nav 2013

(0) ShareShare
ReportReport
Posted on by 15

Hello everyone,

I have a record in which an XML content is saved in a BLOB field. I am looking for a C/AL code to read this XML content. I have Navision 2013.

I have the same question (0)
  • Verified answer
    Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    You can do something like this, where as Signed Document XML is a BLOB field. Once you load it in XmlDoc you can parse it.

    SalesInvoiceHeader.CALCFIELDS("Signed Document XML");
    SalesInvoiceHeader."Signed Document XML".CREATEINSTREAM(InStr);
    XMLDoc.Load(InStr);

  • mbambia Profile Picture
    15 on at

    Thanks a lot for your reply.

    I used your code but I have this error: This message is for C/AL programmers: Error calling 'System.Xml.XmlDocument.Load': Invalid character in specified encoding. Line 831, position 47. My code is below:

    Variables

    Name DataType Subtype Length

    WriteStream OutStream

    ReadStream InStream

    XMLDocument Automation 'Microsoft XML, v6.0'.DOMDocument60

    xml DotNet System.Xml.XmlDocument.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    xmlnodelist DotNet System.Xml.XmlNodeList.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    xmlnode DotNet System.Xml.XmlNode.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    myRecord  Record myRecord

    Code

    myRecord .GET(rowNumber);

    myRecord .CALCFIELDS("XMLField");

    myRecord ."XMLField".CREATEINSTREAM(ReadStream);

    xml := xml.XmlDocument();

    xml.Load(ReadStream);

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,091 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 946 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans