microsoft / microsoft/AL

XML Document WriteTo Exception

Open
#8,082 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

input-needed
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

1. Describe the bug
Writing an XmlDocument to an OutStream was working perfectly fine, but it has now started to randomly throw an exception.

2. To Reproduce
Steps to reproduce the behavior:

TempBlob.CreateOutStream(lOutStream, TextEncoding::UTF8);
pXMLDocument.WriteTo(lOutStream);

3. Expected behavior
XML is written to the outstream

4. Actual behavior
Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLArgumentException' was thrown.
Image

5. Versions:

  • AL Language:
  • Visual Studio Code: 1.101.2
  • Business Central: 26.3
  • List of Visual Studio Code extensions that you have installed: AL Code
  • Operating System:
    • [ X] Windows
    • Linux
    • MacOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the reported AL snippet as the entry point: reproduce TempBlob.CreateOutStream(...) followed by pXMLDocument.WriteTo(lOutStream) on Business Central 26.3. Compare the failing behavior with the expected XML write and investigate the NavNCLArgumentException; done means the XML writes to the outstream without the exception.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.