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

Notifications

Announcements

No record found.

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,243 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,664

#2
YUN ZHU Profile Picture

YUN ZHU 960 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans