---
id: object/codeunit/6224
type: object
title: Codeunit 6224 "XML DOM Management"
summary: Codeunit 6224 "XML DOM Management" in Base Application (System.Xml). 63 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC25, BC27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "27"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 9cbaa2bc447e4908c896ef7a55b8dfd3f56b91452729df05e2a207603d9043e8
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/Xml/XMLDOMManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Modules/System/Xml/XMLDOMManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6224
name: XML DOM Management
namespace: System.Xml
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 70
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 43
  implements: 0
---

# Codeunit 6224 "XML DOM Management"

> Codeunit 6224 "XML DOM Management" in Base Application (System.Xml). 63 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC25, BC27.

Base Application · System.Xml · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/Xml/XMLDOMManagement.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeAddElementWithPrefix(var NodeName: Text)` (integration)

## Procedures

- `AddElement(var XMLNode: DotNet XmlNode; NodeName: Text; NodeText: Text; NameSpace: Text; var CreatedXMLNode: DotNet XmlNode): Integer`
- `AddElement(var ParentXmlNode: XmlNode; NodeName: Text; NodeText: Text; NameSpace: Text; var CreatedXmlNode: XmlNode): Boolean`
- `AddRootElement(var XMLDoc: DotNet XmlDocument; NodeName: Text; var CreatedXMLNode: DotNet XmlNode)`
- `AddRootElement(var RootXmlDocument: XmlDocument; NodeName: Text; var CreatedXmlNode: XmlNode): Boolean`
- `AddRootElementWithPrefix(var XMLDoc: DotNet XmlDocument; NodeName: Text; Prefix: Text; NameSpace: Text; var CreatedXMLNode: DotNet XmlNode)`
- `AddRootElementWithPrefix(var RootXmlDocument: XmlDocument; NodeName: Text; Prefix: Text; NameSpace: text; var CreatedXmlNode: XmlNode): Boolean`
- `AddElementWithPrefix(var XMLNode: DotNet XmlNode; NodeName: Text; NodeText: Text; Prefix: Text; NameSpace: Text; var CreatedXMLNode: DotNet XmlNode): Integer`
- `AddElementWithPrefix(var ParentXmlNode: XmlNode; NodeName: Text; NodeText: Text; Prefix: Text; NameSpace: text; var CreatedXmlNode: XmlNode): Boolean`
- `AddAttribute(var XMLNode: DotNet XmlNode; Name: Text; NodeValue: Text): Integer`
- `AddAttribute(var ParentXmlNode: XmlNode; Name: Text; NodeValue: Text)`
- `AddNameSpacePrefixedAttribute(XMLDomDocParam: DotNet XmlDocument; XMLDomNode: DotNet XmlNode; NameSpace: Text; AttribName: Text; AttribValue: Text): Boolean`
- `AddAttributeWithPrefix(var XMLNode: DotNet XmlNode; Name: Text; Prefix: Text; NameSpace: Text; NodeValue: Text): Integer`
- `AddAttributeWithPrefix(var ParentXmlNode: XmlNode; Name: Text; Prefix: Text; NameSpace: Text; NodeValue: Text): Boolean`
- `AddNamespaceDeclaration(var ParentXmlNode: XmlNode; Prefix: Text; NameSpace: Text): Boolean`
- `FindNode(XMLRootNode: DotNet XmlNode; NodePath: Text; var FoundXMLNode: DotNet XmlNode): Boolean`
- `FindNode(RootXmlNode: XmlNode; NodePath: Text; var FoundXmlNode: XmlNode): Boolean`
- `FindNodeWithNamespace(XMLRootNode: DotNet XmlNode; NodePath: Text; Prefix: Text; NameSpace: Text; var FoundXMLNode: DotNet XmlNode): Boolean`
- `FindNodeWithNamespace(RootXmlNode: XmlNode; NodePath: Text; Prefix: Text; Namespace: Text; var FoundXmlNode: XmlNode): Boolean`
- `FindNodesWithNamespace(XMLRootNode: DotNet XmlNode; XPath: Text; Prefix: Text; NameSpace: Text; var FoundXMLNodeList: DotNet XmlNodeList): Boolean`
- `FindNodesWithNamespace(RootXmlNode: XmlNode; XPath: Text; Prefix: Text; Namespace: Text; var FoundXmlNodeList: XmlNodeList): Boolean`
- `FindNodesWithNamespaceManager(XMLRootNode: DotNet XmlNode; XPath: Text; XMLNamespaceMgr: DotNet XmlNamespaceManager; var FoundXMLNodeList: DotNet XmlNodeList): Boolean`
- `FindNodesWithNamespaceManager(RootXmlNode: XmlNode; XPath: Text; XmlNamespaceManager: XmlNamespaceManager; var FoundXmlNodeList: XmlNodeList): Boolean`
- `FindNodeXML(XMLRootNode: DotNet XmlNode; NodePath: Text): Text`
- `FindNodeText(XMLRootNode: DotNet XmlNode; NodePath: Text): Text`
- `FindNodeTextWithNamespace(XMLRootNode: DotNet XmlNode; NodePath: Text; Prefix: Text; NameSpace: Text): Text`
- `FindNodeTextNs(XMLRootNode: DotNet XmlNode; NodePath: Text; XmlNsMgr: DotNet XmlNamespaceManager): Text`
- `FindNodes(XMLRootNode: DotNet XmlNode; NodePath: Text; var ReturnedXMLNodeList: DotNet XmlNodeList): Boolean`
- `FindAttribute(var XmlNode: DotNet XmlNode; var XmlAttribute: DotNet XmlAttribute; AttributeName: Text): Boolean`
- `GetAttributeValue(xmlNode: DotNet XmlNode; attributeName: Text): Text`
- `GetAttributeValue(ParentXmlNode: XmlNode; AttributeName: Text): Text`
- `GetAttributeValue(ParentXmlNode: XmlNode; AttributeName: Text; Namespace: Text): Text`
- `AddDeclaration(var XMLDoc: DotNet XmlDocument; Version: Text; Encoding: Text; Standalone: Text)`
- `AddGroupNode(var XMLNode: DotNet XmlNode; NodeName: Text)`
- `AddNode(var XMLNode: DotNet XmlNode; NodeName: Text; NodeText: Text)`
- `AddLastNode(var XMLNode: DotNet XmlNode; NodeName: Text; NodeText: Text)`
- `AddNamespaces(var XmlNamespaceManager: DotNet XmlNamespaceManager; XmlDocument: DotNet XmlDocument)`
- `IsValidXMLNameStartCharacter(InputChar: Char): Boolean`
- `IsValidXMLNameCharacter(InputChar: Char): Boolean`
- `IsXMLRestrictedCharacter(InputChar: Char): Boolean`
- `XMLEscape(Text: Text): Text`
- `LoadXMLDocumentFromText(XmlText: Text; var XmlDocument: DotNet XmlDocument)`
- `LoadXMLNodeFromText(XmlText: Text; var XmlNode: DotNet XmlNode)`
- `LoadXMLDocumentFromInStream(InStream: InStream; var XmlDocument: DotNet XmlDocument)`
- `LoadXMLNodeFromInStream(InStream: InStream; var XmlNode: DotNet XmlNode)`
- `LoadXMLDocumentFromOutStream(OutStream: OutStream; var XmlDocument: DotNet XmlDocument)`
- `LoadXMLDocumentFromFile(FileName: Text; var XmlDocument: DotNet XmlDocument)`
- `LoadXMLDocumentFromFileWithXmlReaderSettings(FileName: Text; var XmlDocument: DotNet XmlDocument; XmlReaderSettings: DotNet XmlReaderSettings)`
- `LoadXMLDocumentFromUri(Uri: Text; var XmlDocument: DotNet XmlDocument)`
- `LoadXMLNodeFromUri(Uri: Text; var XMLRootNode: DotNet XmlNode)`
- `GetUTF8BOMSymbols(): Text`
- `ClearUTF8BOMSymbols(var XmlText: Text)`
- `SaveXMLDocumentToOutStream(var OutStream: OutStream; XMLRootNode: DotNet XmlNode)`
- `GetRelativePath(NodePath: Text; BasePath: Text): Text`
- `ReplaceXMLInvalidCharacters(InputText: Text; ReplaceChar: Char): Text`
- `TryTransformXMLToOutStream(var XmlInStream: InStream; var XslInStream: InStream; var XmlOutStream: OutStream)`
- `TransformXMLText(XmlInText: Text; XslInText: Text): Text`
- `TryGetXMLAsText(InStream: InStream; var Xml: Text)`
- `TryFormatXML(XMLText: Text; var FormattedXMLText: Text)`
- `RemoveNamespaces(XMLText: Text): Text`
- `CreateXslTransformFromBlob(var TempBlob: Codeunit "Temp Blob"; var DotNet_XslCompiledTransform: Codeunit DotNet_XslCompiledTransform)`
- `XslCompiledTransformToBlob(var DotNet_XslCompiledTransform: Codeunit DotNet_XslCompiledTransform; var TempBlob: Codeunit "Temp Blob"; var DestinationStream: OutStream)`
- `XslCompiledTransformToStream(var DotNet_XslCompiledTransform: Codeunit DotNet_XslCompiledTransform; var SourceXmlStream: InStream; var DestinationStream: OutStream)`
- `XMLTextIndent(InputXMLText: Text): Text`

Plus 6 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3013 "DotNet_XmlDocument"](../codeunit/3013.md) (8 calls: `CreateXslTransformFromBlob → InitXmlDocument`, `CreateXslTransformFromBlob → Load`, `TryGetXMLAsText → InitXmlDocument`, …)
- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (6 calls: `CreateXslTransformFromBlob → CreateInStream`, `TransformXMLText → CreateInStream`, `TransformXMLText → CreateOutStream`, …)
- [Codeunit 3038 "DotNet_XslCompiledTransform"](../codeunit/3038.md) (3 calls: `CreateXslTransformFromBlob → Load`, `CreateXslTransformFromBlob → XslCompiledTransform`, `XslCompiledTransformToStream → Transform`)
- [Codeunit 419 "File Management"](../codeunit/419.md) (2 calls: `LoadXMLDocumentFromFile → IsAllowedPath`, `LoadXMLDocumentFromFileWithXmlReaderSettings → IsAllowedPath`)

## Called by

- [Codeunit 1294 "OCR Service Mgt."](../codeunit/1294.md) (15 calls: `CorrectOCRFileNode → FindNode`, `DownloadDocument → FindNodeText`, `DownloadDocument → LoadXMLNodeFromInStream`, …)
- [Codeunit 1652 "Add-in Manifest Management"](../codeunit/1652.md) (14 calls: `AddRegExRuleNode → AddAttribute`, `AddRegExRuleNode → AddAttributeWithPrefix`, `AddRegExRuleNode → FindNodesWithNamespaceManager`, …)
- [Codeunit 1290 "SOAP Web Service Request Mgt."](../codeunit/1290.md) (9 calls: `AddBodyToEnvelope → LoadXMLDocumentFromInStream`, `CreateEnvelope → AddAttribute`, `CreateEnvelope → AddAttributeWithPrefix`, …)
- [Codeunit 7701 "ADCS Communication"](../codeunit/7701.md) (9 calls: `AddAttribute → AddAttribute`, `AddElement → AddElement`, `DecreaseStack → FindNode`, …)
- [Codeunit 8614 "Config. XML Exchange"](../codeunit/8614.md) (9 calls: `AddFieldAttributes → AddAttribute`, `CreateRecordNodes → AddAttribute`, `ExportPackageXMLDocument → AddAttribute`, …)
- [Codeunit 1410 "Doc. Exch. Service Mgt."](../codeunit/1410.md) (8 calls: `ExtractAdditionalAttachment → GetAttributeValue`, `GetDocDispatchErrors → FindNodeTextWithNamespace`, `GetDocumentMetadata → FindNodeTextWithNamespace`, …)
- [Codeunit 1530 "Request Page Parameters Helper"](../codeunit/1530.md) (6 calls: `ConvertFiltersToParameters → AddAttribute`, `ConvertFiltersToParameters → AddDeclaration`, `ConvertFiltersToParameters → AddElement`, …)
- [Codeunit 783 "Relationship Performance Mgt."](../codeunit/783.md) (6 calls: `AddFieldToXml → AddElement`, `RecordsToXml → AddElement`, `RecordsToXml → AddRootElement`, …)
- [Codeunit 1203 "Import XML File to Data Exch."](../codeunit/1203.md) (5 calls: `GetRelativePath → GetRelativePath`, `ParseParentChildDocument → AddNamespaces`, `ParseParentChildDocument → FindNodesWithNamespaceManager`, …)
- [Codeunit 8610 "Questionnaire Management"](../codeunit/8610.md) (5 calls: `CreateFieldSubtree → AddAttribute`, `ExportQuestionnaireToExcel → LoadXMLDocumentFromFile`, `GenerateQuestionnaireXMLDocument → LoadXMLDocumentFromText`, …)
- [Codeunit 1485 "Rolecenter Selector Mgt."](../codeunit/1485.md) (4 calls: `BuildJsonFromPageMetadata → LoadXMLDocumentFromInStream`, `GetActivityButtonsActionContainerXmlNode → GetAttributeValue`, `GetLanguageSpecificCaptionAndTooltip → GetAttributeValue`, …)
- [Table 1518 "My Notifications"](../table/1518.md) (4 calls: `GetXmlFromTableView → AddAttribute`, `GetXmlFromTableView → AddDeclaration`, `GetXmlFromTableView → AddElement`, …)
- [Codeunit 130404 "CAL Test Project Mgt."](../codeunit/130404.md) (3 calls: `Export → AddAttribute`, `Export → LoadXMLDocumentFromText`, `Import → LoadXMLDocumentFromFile`)
- [Codeunit 1560 "Workflow Imp. / Exp. Mgt"](../codeunit/1560.md) (3 calls: `GetWorkflowCodeListFromXml → FindNodes`, `GetWorkflowCodeListFromXml → GetAttributeValue`, `GetWorkflowCodeListFromXml → LoadXMLNodeFromInStream`)
- [Codeunit 248 "VAT Lookup Ext. Data Hndl"](../codeunit/248.md) (3 calls: `InsertLogEntry → LoadXMLDocumentFromInStream`, `PrepareSOAPRequestBody → AddElement`, `PrepareSOAPRequestBody → AddRootElementWithPrefix`)
- [Codeunit 9610 "XSD Parser"](../codeunit/9610.md) (3 calls: `LoadSchemaXML → LoadXMLDocumentFromInStream`, `ParseRestrictionDefinitions → FindNodesWithNamespaceManager`, `ParseSchemaReferenceDefinition → FindNodesWithNamespaceManager`)
- [Table 133 "Incoming Document Attachment"](../table/133.md) (3 calls: `ExtractHeaderField → AddNamespaces`, `ExtractHeaderField → FindNodeTextNs`, `UpdateIncomingDocumentHeaderFields → LoadXMLNodeFromInStream`)
- [Codeunit 249 "VAT Registration Log Mgt."](../codeunit/249.md) (2 calls: `ExtractValue → FindNodeWithNamespace`, `LogVerification → FindNodeWithNamespace`)
- [Codeunit 7700 "ADCS Management"](../codeunit/7700.md) (2 calls: `SendError → AddElement`, `SendError → FindNode`)
- [Codeunit 7702 "Miniform Management"](../codeunit/7702.md) (2 calls: `Initialize → FindNode`, `ReceiveXML → FindNode`)
- [Codeunit 7711 "Miniform Whse. Activity Line"](../codeunit/7711.md) (2 calls: `PrepareData → FindNode`, `ProcessInput → FindNode`)
- [Codeunit 7713 "Miniform Phys.-Inventory"](../codeunit/7713.md) (2 calls: `PrepareData → FindNode`, `ProcessInput → FindNode`)
- [Codeunit 9651 "Document Report Mgt."](../codeunit/9651.md) (2 calls: `IsStreamHasDataset → FindNode`, `IsStreamHasDataset → LoadXMLNodeFromInStream`)
- [Table 8627 "Config. Setup"](../table/8627.md) (2 calls: `ReadPackageHeader → LoadXMLDocumentFromFile`, `ReadPackageHeaderFromStream → LoadXMLDocumentFromInStream`)
- [Codeunit 1200 "Import Bank Statement"](../codeunit/1200.md) (1 call: `OnRun → LoadXMLNodeFromInStream`)
- [Codeunit 1239 "XML Buffer Reader"](../codeunit/1239.md) (1 call: `SaveToTempBlobWithEncoding → LoadXMLDocumentFromText`)
- [Codeunit 1281 "Update Currency Exchange Rates"](../codeunit/1281.md) (1 call: `ShowHttpError → LoadXMLNodeFromInStream`)
- [Codeunit 1297 "Http Web Request Mgt."](../codeunit/1297.md) (1 call: `TryLoadXMLResponse → LoadXMLDocumentFromInStream`)
- [Codeunit 1502 "Workflow Setup"](../codeunit/1502.md) (1 call: `Encode → XMLEscape`)
- [Codeunit 5290 "Xml Helper SAF-T"](../codeunit/5290.md) (1 call: `Initialize → GetUTF8BOMSymbols`)
- [Codeunit 5292 "Xml Helper SAF-T Public"](../codeunit/5292.md) (1 call: `Initialize → GetUTF8BOMSymbols`)
- [Codeunit 5459 "JSON Management"](../codeunit/5459.md) (1 call: `XMLTextToJSONText → LoadXMLDocumentFromText`)
- [Codeunit 583 "Acc. Sched. Report Caption"](../codeunit/583.md) (1 call: `OnGetReportDescription → LoadXMLDocumentFromText`)
- [Codeunit 7705 "Miniform Logon"](../codeunit/7705.md) (1 call: `ProcessInput → FindNode`)
- [Codeunit 7706 "Miniform Logoff"](../codeunit/7706.md) (1 call: `Process → FindNode`)
- [Codeunit 7707 "Miniform Mainmenu"](../codeunit/7707.md) (1 call: `Process → FindNode`)
- [Codeunit 7708 "Miniform Pick Activity List"](../codeunit/7708.md) (1 call: `ProcessSelection → FindNode`)
- [Codeunit 7709 "Miniform Put Activity List"](../codeunit/7709.md) (1 call: `ProcessSelection → FindNode`)
- [Codeunit 7710 "Miniform Move Activity List"](../codeunit/7710.md) (1 call: `ProcessSelection → FindNode`)
- [Codeunit 7712 "Miniform Phys. Journal List"](../codeunit/7712.md) (1 call: `ProcessSelection → FindNode`)
- [Codeunit 7714 "ADCS WS"](../codeunit/7714.md) (1 call: `ProcessDocument → LoadXMLDocumentFromText`)
- [Page 1651 "Curr. Exch. Rate Service Card"](../page/1651.md) (1 call: `ShowHttpError → LoadXMLNodeFromInStream`)
- [Table 7700 "Miniform Header"](../table/7700.md) (1 call: `LoadXMLin → LoadXMLDocumentFromOutStream`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, BC27

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "XML DOM Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
